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

On 'disconnect' event in AmqpConnectionManager is constantly triggered #145

Closed
victor-solvethex opened this issue Mar 12, 2021 · 2 comments
Labels

Comments

@victor-solvethex
Copy link

victor-solvethex commented Mar 12, 2021

It would be nice if the on 'disconnect' event was only triggered when the connection dies instead of every 5 seconds (each time the connection state is checked)

github-actions bot pushed a commit that referenced this issue Aug 25, 2021
## [3.4.1](v3.4.0...v3.4.1) (2021-08-25)

### Bug Fixes

* Only send disconnect event on first error. ([efde3b9](efde3b9)), closes [#145](#145)
@jwalton
Copy link
Owner

jwalton commented Aug 25, 2021

🎉 This issue has been resolved in version 3.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ssukienn
Copy link

ssukienn commented Oct 14, 2021

@jwalton I find this change problematic. How are you supposed to track how many times you tried to connect now? I was relying on this repeating event with implementing the max retries approach.

Now I think I could only do that by implementing my own interval and using isConnected method, with resetting the timer on connect event (similarly to resetting retry count).

Still, it is timer over lib's timer which I think would be less accurate than the event which fired exactly when amqlib connect call rejects or connection was closed.

Am I missing something here?

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

No branches or pull requests

3 participants