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/08/07 12:12:26 UTC

[GitHub] [pulsar] aloyszhang edited a comment on issue #7775: seeking on a timestamp, blocks the reader

aloyszhang edited a comment on issue #7775:
URL: https://github.com/apache/pulsar/issues/7775#issuecomment-670486360


   @daddykotex 
   If seekTime is after the last message has been published, then `Reader#readNext` will be blocked since there is no more message.  For non-blocking, you can use `readNext(int timeout, TimeUnit unit)` instead.
   Why `Reader#hasMessageAvailable` return true even the seekTime is after the publishTime, I think it's a bug. 
   The reason is that `Reader#hasMessageAvailable`  calls `ConsumerImpl#getLastMessageIdAsync` which will return the last messageId of topic, and  'Reader#seek' has no effect to `Reader#hasMessageAvailable`.
   
   


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