Producer handle ReceivedSendReceipt will close cnx when response sequenceID is not equal pendingQueue msg sequenceID
code is this:
if pi.sequenceID != response.GetSequenceId() {
// if we receive a receipt that is not the one expected, the state of the broker and the producer differs.
// At that point, it is better to close the connection to the broker to reconnect to a broker hopping it solves
// the state discrepancy.
p.log.Warnf("Received ack for %v on sequenceId %v - expected: %v, closing connection", response.GetMessageId(),
response.GetSequenceId(), pi.sequenceID)
p.cnx.Close()
return
}
This processing method is more violent, and it will cause a large number of reconnections in the scene of response timeout.
In addition, this processing method is different from java client
Original Issue: apache/pulsar-client-go#650
Producer handle ReceivedSendReceipt will close cnx when response sequenceID is not equal pendingQueue msg sequenceID code is this:
This processing method is more violent, and it will cause a large number of reconnections in the scene of response timeout.
In addition, this processing method is different from java client