MarvinCai commented on issue #4642: URL: https://github.com/apache/pulsar/issues/4642#issuecomment-732637858
I tried to reproduce and actually get an exception. I did the following 1) Create producer with batch enabled. 2) Produce 3 messages, 3) Set connectionhandler state to Connecting 4) Call flush 5) Set connectionhandler state back to Ready and produce 3 messages then call flush again. I'm seeing `Got ack for msg. expecting: 0 - 2 - got: 3 - 5 - queue-size: 2` in log, then connection is closed. So the first batch is put into pendingMessages queue but not sent out even after connection state is back to Ready. And when the next batch is sent and ack, first request is pulled from pendingMessages and sequenceId doesn't match. ---------------------------------------------------------------- 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]
