[rabbitmq-discuss] rabbitmq-c: how to detect broker failure
Alan Antonuk
alan.antonuk at gmail.com
Mon Oct 7 07:16:30 BST 2013
It depends on what you mean by "broker failure".
If you mean the broker hardware dies, the broker crashes, or (more likely)
something interrupts the network: you'll get an network error on the client
side. In rabbitmq-c this manifests itself in different ways depending on
the function being called: for functions returning an int, a non-zero value
is returned, for functions returning an amqp_rpc_reply_t, type will be set
to AMQP_RESPONSE_LIBRARY_EXCEPTION and library_error will be set to
something non-zero, and for things returning a amqp_*_t object if a NULL
value is returned, calling amqp_get_last_rpc_reply() will get an
amqp_rpc_reply_t which the above rule should be followed.
HTH
-Alan
On Fri, Oct 4, 2013 at 6:13 AM, Jain, Punit <Punit.Jain at emc.com> wrote:
> Hi,****
>
> I am using rabbitmq-c amqp client (0.2.0) to publish messages to RabbitMQ
> broker. I want to be notified in case of broker failure. Is there a way to
> detect this?****
>
> Any method or exception, which may notify us about this error while
> establishing a connection or publishing message?****
>
> ** **
>
> Thanks,****
>
> Punit****
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131006/90899994/attachment.htm>
More information about the rabbitmq-discuss
mailing list