Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable heartbeat? #175

Closed
noorulcompro opened this issue Oct 16, 2018 · 7 comments
Closed

How to disable heartbeat? #175

noorulcompro opened this issue Oct 16, 2018 · 7 comments

Comments

@noorulcompro
Copy link

Hi,

We need to disable the heartbeat as suggested by CloudAMQ Support. Kindly suggest how can we do this?
We are using the following versions of rabbot client and amqp server.

client:
rabbot@1.1.0

Server:
RabbitMQ@3.7.8
Erlang@20.1

Note: We are using CloudAMQ as SAAS.

Thanks.

@carlhoerberg
Copy link

When a heartbeat value of 0 is set, that should be sent to the server, not the server suggested value.

@carlhoerberg
Copy link

Here's the problem: https://github.com/squaremo/amqp.node/blob/6ee18f27e31863f5256bc921a21f36ebf2ba5e74/lib/connection.js#L192

You can close the issue here and open one in amqplib instead

@noorulcompro
Copy link
Author

Thanx @carlhoerberg for the reply.

If you see the rabbot code at the line
https://github.com/arobson/rabbot/blob/master/src/amqp/connection.js#L108

You will find that if we give heartbeat: 0 while making connection even though this library is sending the default value of the heartbeat.

@carlhoerberg
Copy link

amqp-node/amqplib#467

@noorulcompro
Copy link
Author

@carlhoerberg, Thanks for creating the issue.

But I think this rabbot library is too doing the same thing. When we set the hearbeat: 0, it sets the heartbeat to default i.e 30 seconds. This seems to be a bug. Please verify it.

Please check these links
https://github.com/arobson/rabbot/blob/master/src/amqp/connection.js#L108

https://github.com/arobson/rabbot/blob/master/src/amqp/connection.js#L46

@carlhoerberg
Copy link

no, that seems fine. it sets it to 30s if you haven't specified heartbeats at all (i which case i would use the server's suggested value, but at least that's not hte problem here)

@noorulcompro
Copy link
Author

Cool. Lets see if this amqp-node/amqplib#467 solves the problem.

On that note I'm closing this issue.

Thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants