[rabbitmq-discuss] Heartbeats in Ruby

Matthias Radestock matthias at rabbitmq.com
Wed Nov 21 13:34:58 GMT 2012


On 21/11/12 12:57, Brendan Hay wrote:
> For ruby-amqp, I believe the following will pass it through correctly:
>
> opts = AMQP::Client.parse_connection_uri(uri)
> opts.merge!(:heartbeat => 5)
>
> conn = AMQP.connect(opts)

Note that as of RabbitMQ 3.0 the heartbeat interval can be controlled 
server-side - see the 'heartbeat' config item at 
http://www.rabbitmq.com/configure.html#config-items. However, some 
clients do not implement the AMQP spec correctly and ignore the server's 
suggestion. I don't know whether ruby-amqp is one of them.

Regards,

Matthias.


More information about the rabbitmq-discuss mailing list