-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Recover messages when on disconnection #315
Comments
You mean build-in retry? What's your scenario? Are we talking RTM or Web API? |
RTM. Not a retry but to recover the messages we missed during the time was disconnected. |
I see. I could be wrong, but I don't think Slack provides that kind of facility. |
We could try an exponential backoff, synchronously. number_of_retries = 3 First attempt after 2 seconds. [attempt] But I don't know if this would be overkill. Considering that the gem returns an error response, the apps using this gem could implement this functionality. |
I think the issue describes recovering incoming RTM messages that were missed, not retrying API calls (that is more standard in client libraries and I'd be open to having that implemented via https://www.rubydoc.info/github/lostisland/faraday/Faraday/Request/Retry). |
Just to clarify this is the case using the client.on :close, client.on :closed, client.on :hello So a couple of seconds where the Bot was disconnected, so not listening and if during that time a user sent a message the bot won't be aware of that message and won't respond. |
I don't know of a way to recover those messages :( This is one of the reasons to switch from an RTM solution to an event-based one (using https://github.com/slack-ruby/slack-ruby-bot-server-events), where Slack will queue messages if your application is not able to respond. |
Add an option to automatically recover messages sent during the time has been auto disconnected from slack.
The text was updated successfully, but these errors were encountered: