summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Garnock-Jones <tonyg@kcbbs.gen.nz>2009-04-13 13:47:02 -0700
committerTony Garnock-Jones <tonyg@kcbbs.gen.nz>2009-04-13 13:47:02 -0700
commit9309d63b4780c8c654a2398eafa655f90f34c3f4 (patch)
tree63cc495ebf35bd3f17e993347e8e18fabde9966b
parentefb2d4151e4a8dec1918e8d71434457f9925566c (diff)
downloadrabbitmq-server-git-9309d63b4780c8c654a2398eafa655f90f34c3f4.tar.gz
Implement recover-async, rather than recover, while we figure out how recover should work
-rw-r--r--src/rabbit_channel.erl12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 80dde26bec..089550ba9d 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -488,7 +488,7 @@ handle_method(#'basic.qos'{prefetch_count = PrefetchCount},
ok = rabbit_limiter:limit(NewLimiterPid, PrefetchCount),
{reply, #'basic.qos_ok'{}, State#ch{limiter_pid = NewLimiterPid}};
-handle_method(#'basic.recover'{requeue = true},
+handle_method(#'basic.recover_async'{requeue = true},
_, State = #ch{ transaction_id = none,
unacked_message_q = UAMQ }) ->
ok = fold_per_queue(
@@ -500,10 +500,11 @@ handle_method(#'basic.recover'{requeue = true},
rabbit_amqqueue:requeue(
QPid, lists:reverse(MsgIds), self())
end, ok, UAMQ),
- %% No answer required, apparently!
+ %% No answer required - basic.recover is the newer, synchronous
+ %% variant of this method
{noreply, State#ch{unacked_message_q = queue:new()}};
-handle_method(#'basic.recover'{requeue = false},
+handle_method(#'basic.recover_async'{requeue = false},
_, State = #ch{ transaction_id = none,
writer_pid = WriterPid,
unacked_message_q = UAMQ }) ->
@@ -525,10 +526,11 @@ handle_method(#'basic.recover'{requeue = false},
WriterPid, false, ConsumerTag, DeliveryTag,
{QName, QPid, MsgId, true, Message})
end, queue:to_list(UAMQ)),
- %% No answer required, apparently!
+ %% No answer required - basic.recover is the newer, synchronous
+ %% variant of this method
{noreply, State};
-handle_method(#'basic.recover'{}, _, _State) ->
+handle_method(#'basic.recover_async'{}, _, _State) ->
rabbit_misc:protocol_error(
not_allowed, "attempt to recover a transactional channel",[]);