Skip to content

Commit 81dc6e2

Browse files
author
Matthew Sackman
committed
Merging bug 22421 into amqp_0_9_1
2 parents d0d6e52 + fbda319 commit 81dc6e2

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

src/com/rabbitmq/client/Consumer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ public interface Consumer {
7070
*/
7171
void handleShutdownSignal(String consumerTag, ShutdownSignalException sig);
7272

73+
/**
74+
*
75+
*/
76+
void handleRecoverOk();
77+
7378
/**
7479
* Called when a delivery appears for this consumer.
7580
* @param consumerTag the defined consumerTag (either client- or server-generated)

src/com/rabbitmq/client/DefaultConsumer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ public void handleShutdownSignal(String consumerTag, ShutdownSignalException sig
7474
// no work to do
7575
}
7676

77+
/**
78+
* No-op implementation of {@link Consumer#handleRecoverOk}.
79+
*/
80+
public void handleRecoverOk() {
81+
// no work to do
82+
}
83+
7784
/**
7885
* No-op implementation of {@link Consumer#handleDelivery}.
7986
*/

src/com/rabbitmq/client/impl/ChannelN.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,15 @@ public void releaseChannelNumber() {
258258
_channelMutex.notifyAll();
259259
}
260260
return true;
261+
} else if (method instanceof Basic.RecoverOk) {
262+
for (Consumer callback: _consumers.values()) {
263+
callback.handleRecoverOk();
264+
}
265+
266+
// Unlike all the other cases we still want this RecoverOk to
267+
// be handled by whichever RPC continuation invoked Recover,
268+
// so return false
269+
return false;
261270
} else {
262271
return false;
263272
}

0 commit comments

Comments
 (0)