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

Subscriber disconnects and does not recover #103

Open
drorcohen001 opened this issue Feb 4, 2020 · 1 comment
Open

Subscriber disconnects and does not recover #103

drorcohen001 opened this issue Feb 4, 2020 · 1 comment

Comments

@drorcohen001
Copy link

I'm using channel pool to connect to MQ, to listen for messages.
When MQ has connection issues (I see them when it emits 'connecting' events on ConnectFailover), the subscriber disconnects from the MQ (I see '0 consumers' in the admin console)
And when MQ recovers from the connection issues, there are times that the consumer does not recover.
Is there a 'disconnect' event that I can listen to, to re-subscribe to the queue?
Thanks

@r1cebank
Copy link

You can put the subscribing logic inside the manager.connect callback, it is called everytime the client is connected to the server

manager.connect((error, client, reconnect) => {
 // Cal some code to subscribe queues for that client
});

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