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 2021/04/15 16:10:01 UTC
[GitHub] [pulsar] 315157973 edited a comment on pull request #10240: [consumer] fix order guarantee for MultiTopicsConsumerImpl
315157973 edited a comment on pull request #10240:
URL: https://github.com/apache/pulsar/pull/10240#issuecomment-820548537
This is indeed a problem
```
//1
Message<T> message = incomingMessages.poll();
if (message == null) {
//2
pendingReceives.add(result);
cancellationHandler.setCancelAction(() -> pendingReceives.remove(result));
} else {
//3
messageProcessed(message);
result.complete(beforeConsume(message));
}
```
```
// 4
if (peekPendingReceive() != null) {
notifyPendingReceivedCallback(message, null);
}
```
When the execution order is 1、4、2、1、3、4, the order of 3 and 4 cannot be guaranteed
--
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:
users@infra.apache.org