@@ -49,15 +49,11 @@ public class QueueingConsumer extends DefaultConsumer {
4949 // throw a shutdown signal exception.
5050 private volatile ShutdownSignalException _shutdown ;
5151
52- // When this is true we have seen recover_ok but not had a delivery to
53- // attach it to
54- private boolean _nextDeliveryRecoverOk = false ;
55-
5652 // Marker object used to signal the queue is in shutdown mode.
5753 // It is only there to wake up consumers. The canonical representation
5854 // of shutting down is the presence of _shutdown.
5955 // Invariant: This is never on _queue unless _shutdown != null.
60- private static final Delivery POISON = new Delivery (null , null , null , false );
56+ private static final Delivery POISON = new Delivery (null , null , null );
6157
6258 public QueueingConsumer (Channel ch ) {
6359 this (ch , new LinkedBlockingQueue <Delivery >());
@@ -81,15 +77,7 @@ public QueueingConsumer(Channel ch, BlockingQueue<Delivery> q) {
8177 throws IOException
8278 {
8379 checkShutdown ();
84- this ._queue .add (new Delivery (envelope , properties , body ,
85- _nextDeliveryRecoverOk ));
86- _nextDeliveryRecoverOk = false ;
87- }
88-
89- @ Override
90- public void handleRecoverOk () {
91- checkShutdown ();
92- _nextDeliveryRecoverOk = true ;
80+ this ._queue .add (new Delivery (envelope , properties , body ));
9381 }
9482
9583 /**
@@ -99,14 +87,11 @@ public static class Delivery {
9987 private final Envelope _envelope ;
10088 private final AMQP .BasicProperties _properties ;
10189 private final byte [] _body ;
102- private final boolean _recoverOk ;
10390
104- public Delivery (Envelope envelope , AMQP .BasicProperties properties ,
105- byte [] body , boolean recoverOk ) {
91+ public Delivery (Envelope envelope , AMQP .BasicProperties properties , byte [] body ) {
10692 _envelope = envelope ;
10793 _properties = properties ;
10894 _body = body ;
109- _recoverOk = recoverOk ;
11095 }
11196
11297 /**
@@ -132,19 +117,6 @@ public BasicProperties getProperties() {
132117 public byte [] getBody () {
133118 return _body ;
134119 }
135-
136- /**
137- * Have we seen recover_ok immediately before this message?
138- * If true, then all messages <b>before</b> this one that have not been
139- * acked will be recovered, but this one and subsequent ones will not.
140- *
141- * NB: this method does <b>not</b> tell you whether this message, or
142- * any other, actually is recovered - for that, see Envelope.isRedeliver().
143- * @return whether we have seen recover_ok immediately before this message
144- */
145- public boolean getRecoverOk () {
146- return _recoverOk ;
147- }
148120 }
149121
150122 /**
0 commit comments