codelipenghui commented on a change in pull request #5491: Fix message
deduplicate issue while using external sequence id with batch produce
URL: https://github.com/apache/pulsar/pull/5491#discussion_r342428286
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Producer.java
##########
@@ -298,7 +344,8 @@ public void completed(Exception exception, long ledgerId,
long entryId) {
if (!(exception instanceof TopicClosedException)) {
// For TopicClosed exception there's no need to send
explicit error, since the client was
// already notified
-
producer.cnx.ctx().writeAndFlush(Commands.newSendError(producer.producerId,
sequenceId,
+ long callBackSequenceId = lastSequenceId >= sequenceId
? lastSequenceId : sequenceId;
Review comment:
I will add a common function to get the callback sequenceId
----------------------------------------------------------------
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]
With regards,
Apache Git Services