Closed yonyong closed 1 month ago
I also faced this problem. I guess the root cause should be that #7416 , is not compatible with the before version.
If we cannot getKey in batch metadata, we need to read the key from the first single-message-metadata entry
@codelipenghui
we have fixed some issues in key_shared sub. and we only update version >= 2.9 . so suggest to upgrade.
Closing this issue since Pulsar 2.6 isn't maintained. Please upgrade to a supported version of Pulsar broker and client.
Search before asking
Version
2.6.0
Minimal reproduce step
Same Code
producer send Msg
consumer receive Msg
Use Version 2.6.0
Use Version 2.7.1
What did you expect to see?
Two consumers as in the key_shared pattern the same key is consumed by the corresponding consumer.
What did you see instead?
Result:
When using version 2.6.0, when two consumers are enabled, all messages will only be consumed by one consumer (A), and the another consumer (B) will never receive any message unless consumer A is disconnected, which seems to be a fail-over mode but not Key_Shared. When we upgraded to 2.7.1, only the same key is consumed by the corresponding consumer as in the key_shared mode, as expected.
Analysis:
broker shows that both versions of hashRange are same, so we can conclude that there is a difference in how the producer logic is handled between 2.6.0 and 2.7.1 that is causing the problem.
Question
If my judgement is correct, please deal with this issue, why 2.6.0 can't be installed to work in normal key_shared mode?
Anything else?
2.6.0 console log
2.7.1 console log
Are you willing to submit a PR?