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

HonoClientImpl does not notify user on re-connection #559

Open
DanielMaier-BSI opened this issue Apr 5, 2018 · 2 comments
Open

HonoClientImpl does not notify user on re-connection #559

DanielMaier-BSI opened this issue Apr 5, 2018 · 2 comments

Comments

@DanielMaier-BSI
Copy link
Contributor

Hono offers the possibility to let HonoClient handle re-connection after connection loss (after previous successful connection establishment) by setting reconnectAttempts on ProtonClientOptions.

This works well for me on initial connection establishment and also if I use the client only for sending data. However if I want to use the client as receiver, e.g. telemetry consumer, I need to establish a new receiver link after the re-connect somehow.

I don't see a possibility with the current HonoClientImpl as I don't have a way to let me notify about further connection establishments. The only way I see to reach this, is to implement re-connection with disconnectHandler on myself. Is this correct?

If this is correct it would be nice to have some kind of handler that gets notified on re-connects to give the user the possibility to re-create telemetry consumer etc. Or would it be even worth considering doing the re-creation automatically by Hono?

Thanks
Daniel

@sysexcontrol
Copy link
Contributor

Would you mind to create a PR for that?

@DanielMaier-BSI
Copy link
Contributor Author

We have now implemented our own re-connection handler that also re-establishes receiver link. If no one else is interested in this feature I can close this issue. How did you solve this for command and control receiver links?

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