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
I found the following code in the class RecoveryAwareChannelN:
@Override
public void basicAck(long deliveryTag, boolean multiple) throws IOException {
long realTag = deliveryTag - activeDeliveryTagOffset;
// 0 tag means ack all when multiple is set
if (realTag > 0 || (multiple && realTag == 0)) {
transmit(new Basic.Ack(realTag, multiple));
metricsCollector.basicAck(this, deliveryTag, multiple);
}
}
When activeDeliveryTagOffset and deliveryTag are the same (this can happen directly after a channel is reconnected/recovered) this method will ack all outstanding messages instead of acking nothing.
The output of the attached sample application contains PRECONDITION_FAILED - unknown delivery tag 1 because it is trying to ack all messages. But it was already acked by acking the first message after connection recovery.