[rabbitmq-discuss] queue discovery
Jerry Kuch
jerryk at vmware.com
Tue Jan 31 19:26:05 GMT 2012
Hi, Steven...
If you publish using the 'mandatory' flag (or the 'immediate' flag for
that matter) and the message can't be delivered (for the notion of
'delivered' enforced by the respective flag), the Rabbit broker will
hand the message back to the sending client using the basic.return
AMQP command.
You'd catch this by subscribing to the IModel.BasicReturn event with
something like:
channel.BasicReturn += new RabbitMQ.Client.Events.BasicReturnEventHandler( whatever_args );
If you've not go any listeners attached to that event, the failed
delivery of your message will pass by unnoticed...
(NOTE: Please double check the real docs when I give .NET advice; I'm far from
an expert on that client and not regularly immersed in the .NET world with
sufficient intensity :-) )
Best regards,
Jerry
----- Original Message -----
From: "Steven Taylor" <taylste at gmail.com>
To: "Jerry Kuch" <jerryk at vmware.com>
Cc: rabbitmq-discuss at lists.rabbitmq.com
Sent: Monday, January 30, 2012 10:25:38 PM
Subject: Re: [rabbitmq-discuss] queue discovery
Hi Jerry,
under the .net client, would that come through on the below? event BasicAckEventHandler BasicAcks;
thanks,
-Steven
On 31 January 2012 05:49, Jerry Kuch < jerryk at vmware.com > wrote:
Hi, Steven
Asserting the queue existence probably may not be heavyweight enough for you
to worry about. That said, you could consider setting the 'mandatory' flag
when you publish, in which case you'll get an asynchronous notification if the
message cannot be routed to any queue (e.g. if no queues are bound to the
exchange you published too, or your routing key didn't match one that was, etc.)
Best regards,
Jerry
----- Original Message -----
From: "Steven Taylor" < taylste at gmail.com >
To: rabbitmq-discuss at lists.rabbitmq.com
Sent: Monday, January 30, 2012 9:21:46 PM
Subject: [rabbitmq-discuss] queue discovery
Hi,
chicken and egg situation here.
Sender expects that receiver will have created a queue, only, the sender is in this case the first to exist, and so sends a message to a non-existant queue.
Result: rabbit throws away the message. Is the only way forward to always assert queue existance, or is there a lighter weight alternative? i.e. it'd be nice to get a status or exception back stating if the message got routed or not.
Same situation could occur if queue is defined with non durable and autodelete. i.e. rabbit goes down and then comes back up.
thanks,
-Steven
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list