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

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing 
similar.
   
   
   ### Version
   
   d040039e3a351056d0b3be31adbad4a0b72fee09
   
   ### Minimal reproduce step
   
   ```c++
       for (int i = 0; i < 3; i++) {
           Message msg = MessageBuilder().setContent("content").build();
           producer.sendAsync(msg, nullptr);
       }
       producer.flush();
       LOG_INFO("sequence id: " << producer.getLastSequenceId())
   ```
   
   ### What did you expect to see?
   
   The output should be `sequence id: 2` because the 3 messages' sequence ids 
are [0, 1, 2].
   
   ### What did you see instead?
   
   However, the result is `sequence id: 4`, if changing `i < 3` to `i < 5`, the 
result becomes `sequence id: 8`, which means the sequence id is increased twice 
for each message in the batch.
   
   ### 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