You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/28 06:33:05 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #16171: [fix][client] Fix duplicate messages caused by seek

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


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java:
##########
@@ -248,6 +248,10 @@ private void startReceivingMessages(List<ConsumerImpl<T>> newConsumers) {
 
     private void receiveMessageFromConsumer(ConsumerImpl<T> consumer) {
         consumer.receiveAsync().thenAcceptAsync(message -> {
+            if (consumer.isDuringSeek()) {
+                receiveMessageFromConsumer(consumer);

Review Comment:
   This will introduce a busy loop here?



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org