diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2010-06-21 14:00:01 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2010-06-21 14:00:01 +0100 |
| commit | 78bb3b1190c21b1736e9192475c2068d81d6aa40 (patch) | |
| tree | c762c9df68041cd84d9775778aaf333195d95b01 | |
| parent | 5345308f802e1b1f8ca8e75289fa98d8b9bba655 (diff) | |
| parent | 37cc9c3454755c8543e9dbe73151f6771fef8820 (diff) | |
| download | rabbitmq-server-git-78bb3b1190c21b1736e9192475c2068d81d6aa40.tar.gz | |
Merged bug 22767 into default.
| -rw-r--r-- | src/rabbit_channel.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 1ab34f8653..6d6d29e4fc 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, |
