[rabbitmq-discuss] New to Rabbit in C#
Michael Klishin
mklishin at gopivotal.com
Wed Jun 11 00:32:24 BST 2014
On 11 June 2014 at 03:27:50, Andre (andretodd at verizon.net) wrote:
> > channel.BasicPublish("", "task_2queue", true, properties,
> body);
Correct, this is publishing as mandatory.
> How do I receive the return?
By registering a handler:
http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v3.3.2/rabbitmq-dotnet-client-3.3.2-client-htmldoc/html/type-RabbitMQ.Client.Events.BasicReturnEventHandler.html
> Also, Publisher confirms, do you have any code examples of this?
It's the feature you are using. I'd recommend using
channel.ConfirmSelect + channel.WaitForConfirms but basic.ack
handlers is an option, too.
If you care about throughput, wait for batches of messages
rather than every single one (IModel#WaitForConfirms blocks
the caller until all outstanding messages are acknowledged).
--
MK
Software Engineer, Pivotal/RabbitMQ
More information about the rabbitmq-discuss
mailing list