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/05/08 12:05:22 UTC

[GitHub] [pulsar] Lanayx opened a new issue #10515: HasMessageAvailable incorrectly returns "true" when there are no available messages

Lanayx opened a new issue #10515:
URL: https://github.com/apache/pulsar/issues/10515


   **Describe the bug**
   I want to read messages starting from some timestamp, for that I use `startMessageFromRollbackDuration` configuration. If there are messages available i expect `hasMessageAvailable` to return true, and if no messages are available it should return false. However it still returns true in the latter cast.
   
   **To Reproduce**
   
   ```java
               Producer<byte[]> producer = client.newProducer()
                       .topic(topicName)
                       .enableBatching(false)
                       .sendTimeout(0, TimeUnit.MILLISECONDS)
                       .create();
               MessageId msgId = producer.newMessage().value(("Hello").getBytes()).send();
               Thread.sleep(4000);
   
               Reader<byte[]> reader = client.newReader()
                   .topic(topicName)
                   .startMessageFromRollbackDuration(1, TimeUnit.SECONDS)
                   .create();
               Boolean result = reader.hasMessageAvailable();
               System.out.printf("Result: %b\n", result); // returns true
   ```
   
   **Expected behavior**
   HasMessageAvailable should return false in the case above
   
   **Additional context**
   Client version 2.7.1 (reproduced in previous versions as well)
   


-- 
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



[GitHub] [pulsar] codelipenghui commented on issue #10515: HasMessageAvailable incorrectly returns "true" when there are no available messages

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #10515:
URL: https://github.com/apache/pulsar/issues/10515#issuecomment-1058890616


   The issue had no activity for 30 days, mark with Stale label.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] gaozhangmin commented on issue #10515: HasMessageAvailable incorrectly returns "true" when there are no available messages

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on issue #10515:
URL: https://github.com/apache/pulsar/issues/10515#issuecomment-858731218


   please assign to me, if no one working on this 


-- 
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