BewareMyPower commented on pull request #8606:
URL: https://github.com/apache/pulsar/pull/8606#issuecomment-735884386


   @saosir You're right. I just missed here. The same message id would be added 
twice to unacked message tracker. 
   
   And just now I found the reason why my test showed redelivery only happened 
once for each partition. It's because the partitioned consumer's redelivery 
timer started a little earlier than the internal consumers' redelivery timer.
   
   So nearly each time the partitioned consumer's redelivery callback was 
triggered first. It called all the internal consumers' redelivery callbacks 
which cleared the `UnAckedMessageTracker`.
   
   Finally , it's time for the internal consumers to trigger the redelivery 
callback. But the redelivery wouldn't happen because the trackers were empty.
   
   In conclusion, there's a race condition which is hard to happen if the 
number of partitions is not large. I think the tracker of 
`PartitionedConsumerImpl` is redundant.


----------------------------------------------------------------
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:
[email protected]


Reply via email to