pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] wolfstudy commented on issue #3180: Go client Reader panics when passing custom StartMessageID
Date Wed, 30 Jan 2019 04:40:44 GMT
wolfstudy commented on issue #3180: Go client Reader panics when passing custom StartMessageID

URL: https://github.com/apache/pulsar/issues/3180#issuecomment-458809574
 
 
   @tobgu about StartMessageID, we offer the following three ways:
   
   ```
   // The initial reader positioning is done by specifying a message id. The options are:
   	//  * `pulsar.EarliestMessage` : Start reading from the earliest message available in
the topic
   	//  * `pulsar.LatestMessage` : Start reading from the end topic, only getting messages
published after the
   	//                           reader was created
   	//  * `MessageID` : Start reading from a particular message id, the reader will position
itself on that
   	//                  specific position. The first message to be read will be the message
next to the specified
   	//                  messageID
   	StartMessageID MessageID
   ```
   
   you can use it, for example:
   
   ```
   reader, err := client.CreateReader(ReaderOptions{
   		Topic:          "my-reader-topic",
   		StartMessageID: LatestMessage,
   	})
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Mime
View raw message