Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Conversation

@TechnotronicOz
Copy link
Contributor

Node-amqp has an open issue with heartbeats not reconnecting if they don't come back. When node-amqp loses connection, it emits an end which is then picked up in the end event listener. From there, it looks to see if the ready event was already fired, if it was not, the library then assumes you have an authentication issue and emits an error. The issue lies within here, it never looks to see if the socket was destroyed and then attempts to reconnect.

I have created a "fix" version that does not use the options.reconnect to verify you want to it to reconnect but its more a proof of concept at e30ac3fabdd6379ff2d8e12c489d90371417e364


return function connect(url, opts) {
if (!connectionPromise) {
connectOpts = opts;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the error handler should be connection.on("close", checkConnected) to handle multiple disconnects from Rabbit, otherwise after your first reconnect, it will not attempt to reconnect.

@TechnotronicOz TechnotronicOz force-pushed the monkey_patch_reconnet branch from fc5592d to 3fee0a8 Compare April 19, 2017 20:30
@TechnotronicOz TechnotronicOz merged commit 6c40ad2 into master Apr 24, 2017
@TechnotronicOz TechnotronicOz deleted the monkey_patch_reconnet branch April 24, 2017 14:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants