RobertIndie opened a new issue, #385:
URL: https://github.com/apache/pulsar-client-cpp/issues/385

   ### Search before asking
   
   - [X] I searched in the 
[issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing 
similar.
   
   
   ### Version
   
   9ffd2ef45f87e52745d3baad454aae081f035507
   
   ### Minimal reproduce step
   
   ```
       Client client(serviceUrl);
   
       const std::string topic = "test-seek-latest-message-id-" + 
std::to_string(time(nullptr));
   
       Producer producer;
       ASSERT_EQ(ResultOk, client.createProducer(topic, producer));
   
       MessageId id;
       ASSERT_EQ(ResultOk, 
producer.send(MessageBuilder().setContent("msg").build(), id));
   
       Reader readerExclusive;
       ASSERT_EQ(ResultOk,
                 client.createReader(topic, MessageId::latest(), 
ReaderConfiguration(), readerExclusive));
   
       Reader readerInclusive;
       ASSERT_EQ(ResultOk,
                 client.createReader(topic, MessageId::latest(),
                                     
ReaderConfiguration().setStartMessageIdInclusive(true), readerInclusive));
   
       Message msg;
       bool hasMsgAvaliable = false;
       readerInclusive.hasMessageAvailable(hasMsgAvaliable);
       ASSERT_TRUE(hasMsgAvaliable);
       ASSERT_EQ(ResultOk, readerInclusive.readNext(msg, 3000));
       ASSERT_EQ(ResultTimeout, readerExclusive.readNext(msg, 3000));
   
       readerExclusive.close();
       readerInclusive.close();
       producer.close();
   ```
   
   ### What did you expect to see?
   
   The test should be passed.
   The readerInclusive should be able to read the next message.
   
   ### What did you see instead?
   
   The readerInclusive can't read the next message.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to