Need some troubleshooting help with a weird race condition we’re seeing with our EventBridge integration.
Here’s the raw log output from our consumer lambda:
{
"source": "genesys.cloud",
"detail-type": "ConversationEvent",
"detail": {
"id": "conv-uuid-12345",
"type": "web_messaging",
"timestamp": "2023-10-27T14:30:00Z"
}
}
We’re getting this exact same event payload twice within a 500ms window. It’s messing up our iOS app’s state management because we’re trying to update the local SQLite DB with the conversation metadata. The first event triggers a UI refresh, then the second one comes in and causes a duplicate notification badge count or worse, a session reset if the logic isn’t tight.
I’ve checked the Genesys Cloud webhook configuration and it’s set to retry on 5xx errors, but we’re returning 200 OK immediately. So it’s not a retry loop. It feels like a fan-out duplication in the EventBridge rule or maybe the source system is emitting it twice for some reason.
We’ve tried using the EventID from the EventBridge envelope as a unique key in our DynamoDB table to filter duplicates, but the EventID is also identical for both events. That’s the kicker. If the ID is the same, standard deduplication based on ID fails unless we add a timestamp tolerance, which feels hacky.
Has anyone else hit this with the Web Messaging SDK events? Are we missing a header or a specific filter in the EventBridge rule to prevent this? Or should we be looking at the Genesys side for a config that causes double emissions?
We’ve got the SDK version 2.1.4 on iOS and the backend is handling the webhook-to-EventBridge push.
How do you handle deduplication when the EventBridge EventID is identical for duplicate events?