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 2020/02/26 03:28:29 UTC
[GitHub] [pulsar] yjshen opened a new pull request #6362: [ClientAPI]Fix
hasMessageAvailable()
yjshen opened a new pull request #6362: [ClientAPI]Fix hasMessageAvailable()
URL: https://github.com/apache/pulsar/pull/6362
Fixes #6333
Previously, `hasMoreMessages` is test against:
```
return lastMessageIdInBroker.compareTo(lastDequeuedMessage) == 0
&& incomingMessages.size() > 0;
```
However, the `incomingMessages` could be 0 when the consumer/reader has just started and hasn't received any messages yet.
In this PR, the last entry is retrieved and decoded to get message metadata. for the batchIndex field population.
----------------------------------------------------------------
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
With regards,
Apache Git Services