[rabbitmq-discuss] Publish to queue fails but publish to direct exchange works

Raphael Simon raphael at rightscale.com
Fri Jun 18 06:17:13 BST 2010


Running some queries on the broker shows that the queue route is indeed gone
from mnesia while the exchange route still exists:

(rabbit at ip-10-194-206-32)17> mnesia:transaction(fun() ->
qlc:eval(qlc:q([{route,{binding,{resource,<<"/right_net">>,exchange,<<>>},A,{resource,<<"/right_net">>,queue,Queue},B},C}
||
{route,{binding,{resource,<<"/right_net">>,exchange,<<>>},A,{resource,<<"/right_net">>,queue,Queue},B},C}
<- mnesia:table(rabbit_route),
Queue=:=<<"nanite-rs-instance-1adc9b7647af742d57916134ec5e4d488016d864-1098629">>]))
end).
*{atomic,[]}*

(rabbit at ip-10-194-206-32)18> mnesia:transaction(fun() ->
qlc:eval(qlc:q([{route,{binding,{resource,<<"/right_net">>,exchange,Exchange},A,{resource,<<"/right_net">>,queue,B},C},D}
||
{route,{binding,{resource,<<"/right_net">>,exchange,Exchange},A,{resource,<<"/right_net">>,queue,B},C},D}
<- mnesia:table(rabbit_route),
Exchange=:=<<"nanite-rs-instance-1adc9b7647af742d57916134ec5e4d488016d864-1098629">>]))
end).
*{atomic,[{route,{binding,{resource,<<"/right_net">>,*
*                                   exchange,*
*
<<"nanite-rs-instance-1adc9b7647af742d57916134ec5e4d488016d864-1098629">>},*
*                         <<>>,*
*                         {resource,<<"/right_net">>,queue,*
*
<<"nanite-rs-instance-1adc9b7647af742d57916134ec5e4d488016d864-1098"...>>},*
*                         []},*
*                const}]}*

I still don't understand what scenario could cause this to happen though
especially since the exchange is auto-delete (and no other queue is ever
bound to it). We are seeing this on our production system and as a result
have consumers that can't be accessed anymore. Any insight would be greatly
appreciated.

Thanks!

--
Raphael.


On Thu, Jun 17, 2010 at 2:39 PM, Raphael Simon <raphael at rightscale.com>wrote:

> More information on this: the successful case (message actually ends up in
> the queue) uses:
>
> [:sending,
>  #<AMQP::Protocol::Basic::Publish:0xac16128
>   @debug=1,
>   @exchange=
>    "my_queue",
>   @immediate=nil,
>   @mandatory=nil,
>   @routing_key=nil,
>   @ticket=1>]
>
> while the error case (message does not make it to the queue, i.e.
> rabbitmqctl list_queues shows 0 message in the queue) uses:
>
> [:sending,
>  #<AMQP::Protocol::Basic::Publish:0xa2b47d8
>   @debug=1,
>   @exchange="",
>   @immediate=nil,
>   @mandatory=nil,
>   @routing_key=
>    "my_queue",
>   @ticket=1>]
>
> I'm still wondering what are the steps that would recreate this state.
>
> --
> Raphael.
>
> On Wed, Jun 16, 2010 at 6:38 PM, Raphael Simon <raphael at rightscale.com>wrote:
>
>> Hi all, we just saw an interesting behavior where messages posted to a
>> queue did not make it to a client while publishing to the corresponding
>> direct exchange was working. I'm wondering what can cause this behavior to
>> happen. Publishing directly to the queue initially worked but "something
>> happened" and now it seems only messages posted to the exchange make it to
>> the client. The queue is durable (so is the exchange obviously) and
>> auto-delete. Does anyone have seen this behavior before?
>>
>> Thanks!
>>
>> --
>> Raphael.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100617/33be5886/attachment-0001.htm>


More information about the rabbitmq-discuss mailing list