quintans edited a comment on issue #328:
URL: 
https://github.com/apache/pulsar-client-go/issues/328#issuecomment-662925602


   Another way to to read the last message, was if we had a method 
`GetLastMessageID(topic)` that would return the last message ID, then I would 
just use what the client already has.
   example:
   ```go
        lastMsgID := client.GetLastMessageID(topic)
        reader, err := client.CreateReader(ReaderOptions{
                Topic:                   topic,
                StartMessageID:          lastMsgID,
                StartMessageIDInclusive: true, // important: I want to get the 
last message
        })
   ```
   I wonder which would be more efficient... 


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