Zach Blocker
08/13/2025, 2:33 PMDavid K
08/13/2025, 2:47 PMZach Blocker
08/13/2025, 2:51 PMLari Hotari
08/13/2025, 2:58 PMDavid K
08/13/2025, 3:09 PMZach Blocker
08/13/2025, 6:50 PMDavid K
08/13/2025, 7:24 PMZach Blocker
08/13/2025, 8:15 PMLari Hotari
08/14/2025, 6:24 AMAUTO_SPLIT mode provides:
For Key_Shared subscriptions, messages with the same key are delivered and allowed to be in unacknowledged state to only one consumer at a time. This ensures that the order of message delivery by key is preserved.
When new consumers join or leave, the consumer handling a message key can change when the defaultIn some key-ordered message processing use cases, there's a need to detect when a key has been assigned to another consumer. There's a very old issue https://github.com/apache/pulsar/issues/6555 . The solution "send Key hash range change events" alone might not be a sufficient solution to address the use case since there's also a need to know the hashes of individual messages. The hashing algorithm itself is an implementation detail of the broker side and that's why sending the key hash range change events alone isn't considered as a great solution. One possibility would be to pass pre-calculated hashes from the broker with the dispatched messages to the client side so that hashing algorithm could be decoupled between the broker and the client and the client wouldn't need to calculate the hash for each message. I have plans to cover hash range change events during the planning of https://github.com/apache/pulsar/issues/23480 . It's possible that some details could be covered in shared PIP (Pulsar Improvement Proposal) design documents which describe the required Pulsar protocol changes to support these features. Does your use case require detecting when a key has been assigned to another consumer when using Key_Shared subscription's AUTO_SPLIT mode?mode is used, but only after all unacknowledged messages for a particular key are acknowledged or the original consumer disconnects.AUTO_SPLIT
Dan Rossi
08/15/2025, 12:06 AMLari Hotari
08/15/2025, 7:55 AMZach Blocker
08/15/2025, 6:43 PMIn your case, what would you expect to do with nacked messages?We were previously experimenting with a smart client approach on our end where we would never nack any messages, but instead utilize a sidecar Pulsar topic to keep track of keys that had a failed message. Any subsequent messages under that key would be queued into the sidecar topic so their order could be preserved there, until the original failures were resolved. But of course then it became very important to track key hash range changes because there might be a need for another consumer to assume responsibility for a key that had messages in the failure handling sidecar topic.
Dan Rossi
08/15/2025, 9:04 PMZach Blocker
08/21/2025, 6:02 PM