2222import com .rabbitmq .client .impl .AMQImpl ;
2323import com .rabbitmq .client .impl .ChannelN ;
2424import com .rabbitmq .client .impl .ConsumerWorkService ;
25+ import com .rabbitmq .client .impl .AMQImpl .Basic ;
2526
2627import java .io .IOException ;
2728
@@ -86,7 +87,8 @@ public void basicAck(long deliveryTag, boolean multiple) throws IOException {
8687 long realTag = deliveryTag - activeDeliveryTagOffset ;
8788 // 0 tag means ack all
8889 if (realTag >= 0 ) {
89- super .basicAck (realTag , multiple );
90+ transmit (new Basic .Ack (deliveryTag , multiple ));
91+ metricsCollector .basicAck (this , deliveryTag , multiple );
9092 }
9193 }
9294
@@ -96,15 +98,17 @@ public void basicNack(long deliveryTag, boolean multiple, boolean requeue) throw
9698 long realTag = deliveryTag - activeDeliveryTagOffset ;
9799 // 0 tag means nack all
98100 if (realTag >= 0 ) {
99- super .basicNack (realTag , multiple , requeue );
101+ transmit (new Basic .Nack (realTag , multiple , requeue ));
102+ metricsCollector .basicNack (this , deliveryTag );
100103 }
101104 }
102105
103106 @ Override
104107 public void basicReject (long deliveryTag , boolean requeue ) throws IOException {
105108 long realTag = deliveryTag - activeDeliveryTagOffset ;
106109 if (realTag > 0 ) {
107- super .basicReject (realTag , requeue );
110+ transmit (new Basic .Reject (realTag , requeue ));
111+ metricsCollector .basicReject (this , deliveryTag );
108112 }
109113 }
110114
0 commit comments