Hi @Andrei Josephsen ,
Thank you for reaching out to the Microsoft Q&A forum.
Based on the current Azure Event Hubs and Azure Stream Analytics design, it is not possible to force EventHubProducerClient, EventHubBufferedProducerClient, and Azure Stream Analytics outputs to use the same partition-key hashing function.
The partition key hash algorithm used to map events to partitions is an internal implementation detail and is not exposed as a configurable setting. As a result, different producers or services may route the same partition key value to different physical partitions.
For Azure Stream Analytics parallel JOINs, the engine assumes that records with the same partition key are co-located in corresponding partitions across all inputs. If the upstream producers use different partitioning behaviors and the same EntityId ends up in different partitions, matching events may never be processed together, causing the reduced match rate you observed.
As a workaround, consider one of the following approaches:
• Disable the partition-key optimization and run the JOIN without declaring the Partition key column. This typically restores correctness but may reduce throughput.
• Ensure both input streams are produced through a single consistent publishing path so that identical EntityId values are partitioned consistently before reaching Stream Analytics.
• Repartition or normalize the streams upstream (for example, through an intermediary processing layer) before they are consumed by the ASA job.
Therefore, there is currently no supported mechanism to configure a common partition-key hashing function across EventHubBufferedProducerClient, EventHubProducerClient, and Azure Stream Analytics output destinations.
If maintaining an embarrassingly parallel JOIN is a requirement, the recommended approach is to ensure partition alignment upstream rather than relying on configurable hashing behavior.