-
Notifications
You must be signed in to change notification settings - Fork 55
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
subscribe can timeout for no good reason #130
Comments
I am now seeing this error regularly:
|
I think problem is that dynamic subscriptions/subscriptions just don't work reliably at present time :-( |
@brianmay I am facing a similar issue. Our use case requires us to create dynamic subscriptions when some new artifact is created. Sometimes the subscriptions don't handle messages, although the connection still exists. Sometimes the connection is lost abruptly. I am not able to reproduce this. Have you found any workaround to handle this? |
I ended up moving to an erlang library for mqtt: Which I have written a wrapper for connection management. i.e. if the connection goes does it will try to reconnect and then re-establish all dynamic subscriptions: https://github.com/brianmay/mqtt_potion/ Only problem, is that while there is a hex repo, there isn't any interest in keeping the hex repo up-to-date: Which in turn means I can't publish my library to hex either, because hex doesn't like dependencies to git repos. It also wants to pull in quic dependencies by default. Which probably you don't want or need. Define the Documentation is sadly lacking also. Often it is a case of "use the source" to find answers to questions. Regardless of the above issues, it does seem like a reasonable quality library, and this has resolved all the issues I have had with the tortoise project. While the idea behind tortoise mqtt5 rewrite may have been good (see the mqtt5 branch), unfortunately efforts have completely stalled. Also see https://elixirforum.com/t/any-recommendations-on-a-mqtt-client-for-elixir/41028 Regarding my mqtt_potion library, have also considered porting my mqtt subscription service to this library also: https://github.com/brianmay/robotica-elixir/blob/master/robotica/lib/robotica/subscriptions.ex This allows different processes to subscribe to specific topics over a single mqtt connection, and will automatically unsubscribe when the processes die. e.g. useful for Pheonix live views. Probably needs some documentation also.. Support for wildcard topics would also be good. Hope this helps :-) |
@brianmay thanks for the detailed description. I will try this out. I hope this keeps your connections stable. |
Seems to be when making multiple subscribe requests, sometimes tortoise
Tortoise.Connection.subscribe_sync
function will timeout, and there doesn't appear to be any good reason for it doing so.Retrying the failed function call doesn't help, it also times outs.
The server is operating fine in the meantime.
The text was updated successfully, but these errors were encountered: