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 2019/08/08 06:13:41 UTC
[GitHub] [pulsar] kimcs opened a new issue #4912: Java client Reader
readNext and hasMessageAvailable not working when attempting to find last
message in topic
kimcs opened a new issue #4912: Java client Reader readNext and hasMessageAvailable not working when attempting to find last message in topic
URL: https://github.com/apache/pulsar/issues/4912
**Describe the bug**
Test3: When configuring Reader with startMessageIdInclusive and positioning stream at MessageId.latest, then the next call to Reader.readNext(timeout) should have returned the last message of the topic, but it times out and returns null (without a configured timeout it blocks forever).
Test4: When configuring Reader without startMessageIdInclusive and positioning stream at MessageId.latest, then the next call to Reader.hasMessageAvailable should have returned false, but it returns true. Reader.readNext(timeout) however cannot find a message (as expected but inconsistent with the hasMessageAvailable result).
**To Reproduce**
https://github.com/kimcs/pulsar-readerbug
**Expected behavior**
test3 expected to return the last message in topic, test4 hasMessageAvailable expected to be false.
**Desktop (please complete the following information):**
- OS: macOS Mojave 10.14.6
**Additional context**
The bug was found when trying to use the Reader interface to read the last message in the topic. It could be that the bug is also present if attempting to find a specific message in the middle of the topic.
----------------------------------------------------------------
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