When using a key-shared subscriptions:
• I open a consumer C1, it gets all keys
• I open a consumer C2, some keys leave C1 to C2
• I open a consumer C3, some keys leave C1, C2 to C3
My question is: when I open C3, is that possible that some key that were on C2 return to C1?
a
Alexander Preuß
04/08/2024, 6:36 PM
As far as I know it uses ‘consistent hashing’ under the hood, so the answer should be no, adding C3 should only reassign some of the C1 and C2 keys to C3, just as removing a consumer will only redistribute its keys among the consumers that are still active
🙏 1
Alexander Preuß
04/08/2024, 6:37 PM
Maybe someone who has touched the code can confirm this though
g
Gilles Barbier
04/08/2024, 6:41 PM
To be explicit, I’m asking because I’m debugging some weird behaviors with last version
This seems to be a major change in Key_Shared: https://github.com/apache/pulsar/pull/22245 . For some reason I think it's missing from the release notes. Will have to check if it was included in the latest release or not.