lhotari commented on issue #23845:
URL: https://github.com/apache/pulsar/issues/23845#issuecomment-2599475615

   I also noticed another subtle problem regarding Key_Shared subscription. 
   If the cursor is already in waiting mode when messages are added to the 
replay queue, it would be necessary to call `cancelPendingRead` so that new 
messages produced to the topic don't trigger a read while the replay queue 
messages are read. This would lead to the recently added messages to be dropped 
and added to the replay queue here:
   
https://github.com/apache/pulsar/blob/acac72ea03f7c38cab99ec011b309d5e6bb4fe9d/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java#L230-L255
   For Shared subscription, it's not necessary to cancel the pending read, 
since ordering doesn't matter. The same applies when Key_Shared subscription is 
running in `allowOutOfOrderDelivery` mode. 


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to