nodece commented on code in PR #16171:
URL: https://github.com/apache/pulsar/pull/16171#discussion_r995294949


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java:
##########
@@ -252,6 +252,10 @@ private void receiveMessageFromConsumer(ConsumerImpl<T> 
consumer, boolean batchR
             messagesFuture = 
consumer.receiveAsync().thenApply(Collections::singletonList);
         }
         messagesFuture.thenAcceptAsync(messages -> {
+            if (consumer.isDuringSeek()) {
+                receiveMessageFromConsumer(consumer, batchReceive);

Review Comment:
   > Ok, I guess the fix can only fix the case that the MultiTopicConsumer poll 
messages from the internal consumer.
   
   Right.
   
   > the user will still have chance to get duplicated messages during the seek 
operation?
   
   I think we need to figure out the details of this seek. 
   
   1. When to clean `incomingMessages`, after or before seek?
   2. During the seek, can the client continue to consume the 
`incomingMessages`?
   
    
   
   
   



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