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/13 12:00:05 UTC

[GitHub] [pulsar] kimcs commented on issue #4912: Java client Reader readNext and hasMessageAvailable not working when attempting to find last message in topic

kimcs commented on 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#issuecomment-520805615
 
 
   Currently I'm using the following workaround to be able to read the last message of a topic:
   Use the pulsar-admin-client to get the last-message-id of a topic (-1 means empty topic), then use pulsar-client Consumer.seek to that id and then the next receive call will get the last message of the topic. This is not an ideal solution as it also relies on the pulsar-admin client.

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