feeblefakie commented on issue #7455:
URL: https://github.com/apache/pulsar/issues/7455#issuecomment-654763271


   Here is what is happening.
   For example, consumers for sub1 consumed messages with key "15" as follows.
   ```
   #consumerName key value(produced-time) 
messageId(ledgerId:entryId:partitionIdx)
   46e6d 15 1594111896905 119:5:0
   46e6d 15 1594111899192 119:253:0
   46e6d 15 1594111901040 119:501:0
   46e6d 15 1594111902763 119:749:0
   46e6d 15 1594111904385 119:997:0
   46e6d 15 1594111905990 119:1245:0
   46e6d 15 1594111907638 119:1493:0
   46e6d 15 1594111909202 119:1741:0
   46e6d 15 1594111910738 119:1989:0
   46e6d 15 1594111912326 119:2237:0
   ```
   
   And, consumers for sub2 consumed messages with key "15" as follows.
   ```
   17a20 15 1594111896905 119:5:0
   17a20 15 1594111899192 119:253:0
   17a20 15 1594111901040 119:501:0
   17a20 15 1594111902763 119:749:0
   17a20 15 1594111904385 119:997:0
   5523e 15 1594111910738 119:1989:0 <-- this causes the inconsistency
   17a20 15 1594111905990 119:1245:0
   17a20 15 1594111907638 119:1493:0
   17a20 15 1594111909202 119:1741:0
   5523e 15 1594111912326 119:2237:0
   ```
   You can see that there are two consumers for the key for sub2, and consumer 
`5523e` consumed a value `1594111910738` in the wrong order. It is easily 
identified since the value is a timestamp assigned by a single synchronous 
producer at the time of producing the message.
   
   Regarding the behavior, I have several questions.
   1. Is it expected to have multiple live consumers for a key ?
   2. If yes to the above question, how are multiple consumers supposed to 
cooperate to guarantee the ordering of the messages ?
   3. If no to the 1st question, that's the cause of the inconsistency.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to