psisoyev opened a new issue #8721:
URL: https://github.com/apache/pulsar/issues/8721


   **Describe the bug**
   Whenever you create a new `Reader` with `startMessageId` set to `latest` and 
`startMessageIdInclusive`, `hasMessageAvailable` will be always `true` even if 
the topic is freshly created without any messages inside. 
   
   **To Reproduce**
   ```
   client.newReader()
             .topic("persistent://public/default/" + UUID.randomUUID().toString)
             .startMessageId(MessageId.latest)
             .startMessageIdInclusive()
             .create()
             .hasMessageAvailable
   ```
   Create a new `Reader` for a new topic, set the settings accordingly, call 
`hasMessageAvailable` and it will be always `true`.
   
   **Expected behavior**
   As there are no messages in the topic, I would expect to receive `false` as 
the response.
   
   **Additional context**
   I'm using the latest Java client, version 2.6.2
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to