-
Notifications
You must be signed in to change notification settings - Fork 94
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
Handle permanent publish queue errors in Autopaho #234
Comments
Could you please provide an example of a failed state? Messages really just move from the queue into the session (except with QOS0 where a failure to transmit over the network would lead to the messages being retried). I guess we could add a callback that is called before retransmitting a message; this might be useful in other situations (i.e. a message might have a deadline and, should that time pass, it should not be retried). |
Hypothetically, what if the application is using a file-based queue and the underlying storage medium is disconnected or failed? Or what if the user has a custom queue implementation that relies on a database connection but a connection is not able to be established? Maybe the queue interface needs a way to signal a "permanant failure". |
I'm open to suggestions on this but am not sure how far to go with this; if there is a hardware failure then I think that continually retrying may well be the right approach (when the issue is fixed things will start working again). I guess that adding an error callback might help users detect the issue. One way that a user could deal with this is to implement their own queue, and handle errors how they see fit; this may mean that if an error is detected |
If the
queue
implementation inautopaho
is in a permanently failed state,managePublishQueue()
will continue retrying indefinitely.Should there be some way for
queue
issues to be detected soautopaho
can quit and surface the issue to the user?The text was updated successfully, but these errors were encountered: