@@ -90,12 +90,12 @@ public class ChannelN extends AMQChannel implements com.rabbitmq.client.Channel
9090
9191 /** Set of currently unconfirmed messages (i.e. messages that have
9292 * not been ack'd or nack'd by the server yet. */
93- protected volatile SortedSet <Long > unconfirmedSet =
93+ private volatile SortedSet <Long > unconfirmedSet =
9494 Collections .synchronizedSortedSet (new TreeSet <Long >());
9595
9696 /** Whether any nacks have been received since the last
9797 * waitForConfirms(). */
98- protected volatile boolean onlyAcksReceived = true ;
98+ private volatile boolean onlyAcksReceived = true ;
9999
100100 /**
101101 * Construct a new channel on the given connection with the given
@@ -314,10 +314,14 @@ public void releaseChannelNumber() {
314314 callFlowListeners (command , channelFlow );
315315 return true ;
316316 } else if (method instanceof Basic .Ack ) {
317- callConfirmListeners (command , (Basic .Ack ) method );
317+ Basic .Ack ack = (Basic .Ack ) method ;
318+ callConfirmListeners (command , ack );
319+ handleAckNack (ack .getDeliveryTag (), ack .getMultiple (), false );
318320 return true ;
319321 } else if (method instanceof Basic .Nack ) {
320- callConfirmListeners (command , (Basic .Nack ) method );
322+ Basic .Nack nack = (Basic .Nack ) method ;
323+ callConfirmListeners (command , nack );
324+ handleAckNack (nack .getDeliveryTag (), nack .getMultiple (), false );
321325 return true ;
322326 } else if (method instanceof Basic .RecoverOk ) {
323327 for (Consumer callback : _consumers .values ()) {
0 commit comments