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 handle disconnects? #17

Open
pgouv opened this issue Nov 27, 2017 · 4 comments
Open

How to handle disconnects? #17

pgouv opened this issue Nov 27, 2017 · 4 comments
Assignees

Comments

@pgouv
Copy link

pgouv commented Nov 27, 2017

Although it seems that there is reconnect ability, it seems that after a connection reset it crashes.
Is there a way to deal with this?

@p-goudet
Copy link
Contributor

Thank you for your report, I will inspect this issue soon.

@pgouv
Copy link
Author

pgouv commented Nov 28, 2017

@p-goudet I don't know whether it is my configuration but if connection is reset eg: broker is shutdown/restart I get exception and no reconnect

@p-goudet p-goudet self-assigned this Dec 4, 2017
@p-goudet
Copy link
Contributor

p-goudet commented Dec 4, 2017

A handler was missing to handle exception in case of socket failure (especially when try to read a closed in a socket). I am working on a handler that will call the reconnect() method to the message if the client is configured as persistent. If not the SystemCall error raise by the socket would be raised.

@p-goudet
Copy link
Contributor

p-goudet commented Dec 5, 2017

@parhs Hello,

I released a new version (1.0.5) which should fix this issue. When the client is configured as persistent, the client would try to reconnect to the message broker after it shutdown (or unexpected socket closing on server side). The client would queue the message that should be sent until the connection is reset. As soon as the connection is reset, the client would resubscribe to the previously subscribed topics.

Could you tell me if the new version solves your issue?

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