kubemq-io / kubemq-js

Apache License 2.0
9 stars 7 forks source link

Update queries.ts #2

Closed Neo1975 closed 3 years ago

Neo1975 commented 3 years ago

Fixing a problem to handle reconnection. In this way on error client of this library can decide to request a close to make a reconnection emitting an event on onStateChange. This is not the optimal solution but it is a reasonable way to solve the issue with a minimum change.

kubemq commented 3 years ago

I agree with you that this is not the best solution, however, I'm limited from the grpc package. I'll merge this PR and issue a new release

ukaoskid commented 7 months ago

@Neo1975 @kubemq I am still facing this problem, but it's probably because I haven't understood how to manage the client close on error. (same scenarios like starting receivers when server is down, or when server goes down)

Do you have any example?