merlimat opened a new pull request #7099:
URL: https://github.com/apache/pulsar/pull/7099


   ### Motivation
   
   Negative acknowledgement runs in the background on a consumer and
   triggers redelivery of messages. The tests verify a that messages do
   indeed get redelivered, and which messages they are, for the base
   case, batching and partitioned consumer.
   
   There's a fundamental dependency on timing in the base case. If 100ms
   pass between consumer creation and receiving the last message in first
   receive loop, redelivery will be triggered and the order of messages,
   as asserted by the test will fail.
   
   This first case can be fixed by moving the negative ack to run after
   all messages have been received. However, this can also then fail for
   the batch case.
   
   If the negative ack tracker kicks off during the loop to negatively
   ack the messages, then the redelivery will happen twice (and possibly
   more times depending on how many time it manages to run).
   
   For this reason, if we want the test to be deterministic, we need to
   disable the tracker from kicking off redelivery while we send mark the
   messages as negatively acked.
   


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