squaremo/rabbit.js

heartbeat setup

Closed this issue · 5 comments

Hello,

Sorry if this is a silly/newbie question, but anyone know how to setup the heartbeat feature using rabbit.js?

https://www.rabbitmq.com/heartbeats.html

Thank you very much,
Rogerio

Rogerio, you can tell the context a heartbeat interval by using a querystring parameter when connecting. Something like

var ctx = rabbitjs.createContext('amqp://localhost?heartbeat=380')

The connection URL specification is at http://www.rabbitmq.com/uri-spec.html. amqplib, on which rabbit.js is based, also supports frame_max and channel_max.

Some more detail here: https://www.rabbitmq.com/uri-query-parameters.html

Those are the parameters accepted by RabbitMQ's Erlang client. The descriptions of heartbeat, frame_max and channel_max are accurate though. amqplib does support SSL configuration, but through a different means.

@rogeriobiondi Did the answer above work for you? Please close if so -- thanks!

Hello, thank you very much for your information and clarification about the issue. It answered and helped a lot!
Best regards