[rabbitmq-discuss] RabbitMQ publish
Simone Busoli
simone.busoli at gmail.com
Thu Jan 26 21:22:30 GMT 2012
Hi, basic publish is an asynchronous operation, at least in the .NET
client, therefore you won't spot issues until you do something else with
the channel (called model in the .NET client), like another publish.
In general you should:
- subscribe to shutdown events on connection and model to spot that
something went wrong and for example attempt a reconnection
- to ensure the broker takes responsibility for the messages either put
the channel in confirm mode or enable transactions
The second point with publisher confirms has one gotcha, that is, if
connection shuts down while you're waiting for acks from the broker you
should republish all unconfirmed messages. This is the only way to ensure
that messages will eventually reach their destinations, but it obviously
introduces the chance of messages being duplicated.
On Thu, Jan 26, 2012 at 16:07, mayank <mnkpdon.32 at gmail.com> wrote:
> Hi
>
> I want make sure that message are published to the exchange while
> doing basic publish. As of now in my code the basic publish is
> returning successfully but message is not getting published in because
> of some network issues. It only the next when the client tries to
> publish message the basicpublish gives error.
>
> Is there a way where message has been published before doing anything
> in the code. I am using .net client.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120126/a2e03602/attachment.htm>
More information about the rabbitmq-discuss
mailing list