codelipenghui commented on PR #17318:
URL: https://github.com/apache/pulsar/pull/17318#issuecomment-1250524811

   @congbobo184 Do you remember why the consumer epoch check happened after 
polling the messages from the receiver queue? 
   
   @shibd @congbobo184 
   Can we move it to the beginning of message receiving 
   
   
https://github.com/apache/pulsar/blob/69f3f7471fa6faf24d4776d65e0509538c105d37/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L1271-L1285
   
   It looks like if the message with invalid epoch, we don't need to add it to 
the receiver queue.
   And we will also introduce client-side stats issues, because users haven't 
seen that message, but from stats they see the received messages are increased.
   
   
https://github.com/apache/pulsar/blob/69f3f7471fa6faf24d4776d65e0509538c105d37/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L1628-L1644
   
   The messages with invalid epoch should be the skipped messages like here
   
   
https://github.com/apache/pulsar/blob/69f3f7471fa6faf24d4776d65e0509538c105d37/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L1559
   
   It also makes sense to add skipped messages in `ConsumerStats`


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