wolfstudy edited a comment on issue #223:
URL: 
https://github.com/apache/pulsar-client-go/issues/223#issuecomment-619392817


   Thanks @cornelk  feedback,  @jiazhai maybe this is not a bug.
   
   In the first send, we can't read the message, because the reader 
`StartMessageID` option is `LatestMessageID()`, so in the second send, this 
reader should also not receive messages, right?
   
   If you want to receive a message in the second reader, please refer to the 
following code:
   
   ```
   reader1, err := client.CreateReader(ReaderOptions{
                Topic:                   topic,
                StartMessageID:          EarliestMessageID(),
                StartMessageIDInclusive: false,
        })
   
        ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
        msg, err = reader1.Next(ctx)
        assert.NoError(t, err)
        assert.NotNil(t, msg)
        cancel()
   ```


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