[rabbitmq-discuss] New to Rabbit in C#
andretodd at verizon.net
Wed Jun 11 00:27:51 BST 2014
Thanks for the fast response.
I believe I did put the mandatory flag on. (today is my first day at this)
channel.BasicPublish("", "task_2queue", true, properties, body);
How do I receive the return?
Also, Publisher confirms, do you have any code examples of this?
Thanks so much
From: Michael Klishin [mailto:mklishin at gopivotal.com]
Sent: Tuesday, June 10, 2014 7:22 PM
To: Andre; Discussions about RabbitMQ
Subject: Re: [rabbitmq-discuss] New to Rabbit in C#
On 11 June 2014 at 03:20:03, Andre (andretodd at verizon.net) wrote:
> I'm new to RabbitMQ and trying to write to a Queue and verify the
> message was sent. If it fails I need to know about it. I made a fake
> queue to watch it fail but no matter what I see no exceptions and when
> I am looking for a ack I always get one. I never see the BasicNack.
You will get a nack if an internal error occurs, so it's not very easy to trigger (but possible via rabbitmqctl eval). Publisher confirms is indeed the feature you want.
And to avoid messages being published successfully but routed nowhere, publish them as mandatory. A mandatory message that cannot be routed anywhere will be returned to the sender.
Software Engineer, Pivotal/RabbitMQ
More information about the rabbitmq-discuss