22
22
import com .rabbitmq .client .impl .AMQImpl ;
23
23
import com .rabbitmq .client .impl .ChannelN ;
24
24
import com .rabbitmq .client .impl .ConsumerWorkService ;
25
+ import com .rabbitmq .client .impl .AMQImpl .Basic ;
25
26
26
27
import java .io .IOException ;
27
28
@@ -86,7 +87,8 @@ public void basicAck(long deliveryTag, boolean multiple) throws IOException {
86
87
long realTag = deliveryTag - activeDeliveryTagOffset ;
87
88
// 0 tag means ack all
88
89
if (realTag >= 0 ) {
89
- super .basicAck (realTag , multiple );
90
+ transmit (new Basic .Ack (deliveryTag , multiple ));
91
+ metricsCollector .basicAck (this , deliveryTag , multiple );
90
92
}
91
93
}
92
94
@@ -96,15 +98,17 @@ public void basicNack(long deliveryTag, boolean multiple, boolean requeue) throw
96
98
long realTag = deliveryTag - activeDeliveryTagOffset ;
97
99
// 0 tag means nack all
98
100
if (realTag >= 0 ) {
99
- super .basicNack (realTag , multiple , requeue );
101
+ transmit (new Basic .Nack (realTag , multiple , requeue ));
102
+ metricsCollector .basicNack (this , deliveryTag );
100
103
}
101
104
}
102
105
103
106
@ Override
104
107
public void basicReject (long deliveryTag , boolean requeue ) throws IOException {
105
108
long realTag = deliveryTag - activeDeliveryTagOffset ;
106
109
if (realTag > 0 ) {
107
- super .basicReject (realTag , requeue );
110
+ transmit (new Basic .Reject (realTag , requeue ));
111
+ metricsCollector .basicReject (this , deliveryTag );
108
112
}
109
113
}
110
114
0 commit comments