[rabbitmq-discuss] Best way to ping server from client

Alvaro Videla videlalvaro at gmail.com
Mon Dec 9 17:49:55 GMT 2013

Hi James,

I've thought about implementing some of the hearbeats exposed by
RabbitMQ but is not so easy considering PHP's single thread view of
the world. I could try to approximate timeouts for example, but not
sure about what errors that could bring.

As a complete hack and trying to answer your question, there's the
access_request method which in RabbitMQ won't do much: See
and http://hg.rabbitmq.com/rabbitmq-server/file/3e9ad0a5795e/src/rabbit_channel.erl#l646



On Mon, Dec 9, 2013 at 6:42 PM, James Gardner <james.gardner at noaa.gov> wrote:
> Hi,
> I need to know the best way to 'ping' an AMQP server from a client (I'm
> using PhpAmqpLib). We have encountered some situations where the client
> doesn't realize the server has 'gone away', and hangs for far too long,
> sometimes indefinitely. Regardless of whether this is a problem with the
> client library, if I wanted to test the connection by issuing the most
> benign, inexpensive request, what might that be? Perhaps there is a channel
> method I can call repeatedly at regular intervals without causing errors,
> like QOS, or something else? This would be during a consume.
> Thanks,
> James Gardner, NWS NIDS
> _______________________________________________
> 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