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 2017/12/06 19:16:01 UTC
[GitHub] lovelle commented on a change in pull request #942: Bugfix: duplicate messages for PartitionedConsumers.
lovelle commented on a change in pull request #942: Bugfix: duplicate messages for PartitionedConsumers.
URL: https://github.com/apache/incubator-pulsar/pull/942#discussion_r155333171
##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PartitionedConsumerImpl.java
##########
@@ -191,7 +200,9 @@ protected Message internalReceive(int timeout, TimeUnit unit) throws PulsarClien
Message message;
try {
lock.writeLock().lock();
- message = incomingMessages.poll(0, TimeUnit.SECONDS);
+ message = (incomingMessages.size() > 0) ?
Review comment:
I realize this is not good idea, but I faced the problem that messages were on `incomingMessages` of any consumer level but the `incomingMessages` at partitioned level remained empty, so the consumer goes to 'pendingReceives' without handling messages in `incomingMessages` at consumer impl level.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services