summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-06-21 14:00:01 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-06-21 14:00:01 +0100
commit94952cd49e4da0ecba39db981e5db078dcb38b1d (patch)
treec762c9df68041cd84d9775778aaf333195d95b01
parent63c7f8d467ff7abbf988daa5758af67a7e116310 (diff)
parentfe3d87a560d413618a2e69b47a01c4c0cd0320f9 (diff)
downloadrabbitmq-server-94952cd49e4da0ecba39db981e5db078dcb38b1d.tar.gz
Merged bug 22767 into default.
-rw-r--r--src/rabbit_channel.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 1ab34f86..6d6d29e4 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -447,13 +447,9 @@ handle_method(#'basic.publish'{exchange = ExchangeNameBin,
routed ->
ok;
unroutable ->
- %% FIXME: 312 should be replaced by the ?NO_ROUTE
- %% definition, when we move to >=0-9
- ok = basic_return(Message, WriterPid, 312, <<"unroutable">>);
+ ok = basic_return(Message, WriterPid, no_route);
not_delivered ->
- %% FIXME: 313 should be replaced by the ?NO_CONSUMERS
- %% definition, when we move to >=0-9
- ok = basic_return(Message, WriterPid, 313, <<"not_delivered">>)
+ ok = basic_return(Message, WriterPid, no_consumers)
end,
{noreply, case TxnKey of
none -> State;
@@ -946,7 +942,9 @@ binding_action(Fun, ExchangeNameBin, QueueNameBin, RoutingKey, Arguments,
basic_return(#basic_message{exchange_name = ExchangeName,
routing_key = RoutingKey,
content = Content},
- WriterPid, ReplyCode, ReplyText) ->
+ WriterPid, Reason) ->
+ {_Close, ReplyCode, ReplyText} =
+ rabbit_framing:lookup_amqp_exception(Reason),
ok = rabbit_writer:send_command(
WriterPid,
#'basic.return'{reply_code = ReplyCode,