You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Incorrect last sequence id when sending messages in batch #531
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.
Activity
fix apache#531