ASA parallel JOIN drops matches when the two Event Hubs inputs use different partition-key hashing

Andrei Josephsen 40 Reputation points
2026-08-25T10:11:53.61+00:00

ASA job (compat 1.2) joins two Event Hubs on EntityId (both 4 partitions) into a third hub. With the input Partition key column declared (embarrassingly-parallel), the JOIN silently loses ~78% of matches — no errors. Measured: parallel ≈ 22% match, non-parallel ≈ 100%.

Cause: the two inputs are produced by clients that hash the key differently, so the same EntityId lands on different partitions: EventHubBufferedProducerClient uses client-side lookup3, EventHubProducerClient/gateway uses another hash, and ASA output uses a third.

Q: Can I force all publishers (buffered producer, regular producer, and ASA output) to use the same partition-key hashing function, so the same EntityId always lands on the same partition and a parallel JOIN matches?

Azure Event Hubs

Answer accepted by question author
kagiyama yutaka 5,575 Reputation points
2026-09-26T04:56:10.1266667+00:00

I think the ASA-side fix is to repartition both streams by EntityId with the same partition count before the JOIN, rather than trying to align partition mapping across producers.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author
SIVASANKAR YEDDULA 250 Reputation points Microsoft External Staff Moderator
2026-09-12T09:22:28.8866667+00:00

Hi @Andrei Josephsen ,

Since the partition key hash algorithm is an internal implementation detail and cannot currently be configured, there is no supported method to enforce Kafka Murmur2 partition mapping within the service.

The following mitigation options may be considered:

  • Continue using the existing partition key behavior if cross-platform partition consistency is not a strict requirement.
  • Republish events through an intermediate processing layer to ensure consistent partition assignment when interoperability with Kafka producers is required.
  • Standardize message production through a single producer path to minimize differences in partition routing behavior across services.
  • Submit a product feedback request to the engineering team requesting support for a configurable partition hashing algorithm or Kafka-compatible Murmur2 hashing.
  • Review application design to determine whether strict partition alignment is required or whether event ordering can be maintained through alternative mechanisms.

Limitation

At present, the partition key hash algorithm is not exposed as a customer-configurable setting. Therefore, different services may map the same partition key value to different physical partitions, and this behavior is expected.

Recommended Resolution

If deterministic partition mapping across Kafka and Azure services is a business requirement, republishing or implementing a custom routing layer remains the most practical workaround. However, this approach introduces additional latency and operational cost. A product enhancement request for configurable hashing algorithms would be the preferred long-term solution.

Thanks & Regards,
Sivasankar.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.