Add param to enable "Auto-Acknowledgment" of Events to the SocketModeClient #1299
Labels
discussion
M-T: An issue where more input is needed to reach a decision
enhancement
M-T: A feature request for new functionality
socket-mode
Version: 3x
Milestone
One issue we have noticed in our deployment of a Slack app is that when there are a burst of messages being received, the built-in queue can become too large and can cause messages to expire within the 3-5 second acknowledgment period.
For example, our app receives 200 messages within a 5 second window. They are then received and queued for the message listeners to process. If the queue gets too large, it may take longer than 3-5 seconds for a listener to dequeue and process a message. This results in the app being restricted and unable to receive new messages. This can get exponentially worse when the burst is followed up by a burst of retry messages as well.
Reproducible in:
The Slack SDK version
slack-sdk==3.19.2
Python runtime version
Python 3.10.5
OS info
ProductName: macOS
ProductVersion: 11.5.2
BuildVersion: 20G95
Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
Expected result:
So the thought was to set a parameter which would allow messages to be auto-acknowledged as they enter the queue. This would allow the listeners to handle the events irrespective of their processing time.
It could work something like this:
Actual result:
Socket connection is closed due to missing too many acknowledgements.
Requirements
For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The text was updated successfully, but these errors were encountered: