Find whether the event or the side effect repeated
For Events API deliveries, record the outer event_id from the payload plus the handler name and a short outcome. Compare two duplicate replies. The same ID indicates another delivery of the same event. Different IDs suggest overlapping subscriptions, multiple actions producing similar events, or a bot reacting to its own messages.
ACK quickly on receipt. Slack can retry HTTP Events API deliveries when acknowledgment is missing, and Socket Mode receivers acknowledge their envelope. Use the SDK’s handling for delivery and log only the IDs needed to trace an issue. Keep message text and credentials out of those logs. Slack Events API event IDs and retries.
Store work by event ID across restarts
Make the event ID a unique key in a durable queue or database table for operations such as creating tickets. Use a fast transaction to record a pending operation before acknowledging when your receiver supports that flow. A second delivery of the same key can acknowledge without creating another pending record. Keep records for the retry window that applies to your app.
Have a worker resume incomplete records. Use an idempotency key for any downstream service that supports one. If the worker sends a Slack reply and exits before marking its record complete, queue deduplication alone cannot guarantee one visible reply. Store enough result data to reconcile that case before repeating an external action.
Test a retry and a worker restart
- Send the same harmless fixture event twice against a local handler test.
- Restart between deliveries and check that the durable record survives.
- Confirm the ticket or other effect appears once. Exercise the failure path where processing stops before the action is completed.
For a single hosted worker, see where to store Slack bot state. For a confusing workspace test, stop your local Socket Mode copy or give it its own Slack app so it receives a separate event stream.