Ran into a weird issue today with EventBridge integration sending duplicate events - deduplication strategy. i’m using an Azure Function to process routing.queue.conversation.created events. sometimes i get the exact same event-id twice within 500ms. the docs say “EventBridge ensures at-least-once delivery.” but doesn’t mention how to handle immediate duplicates in code. currently checking a Redis cache but it feels heavy. is there a header i should trust? or is this just how it works?
TL;DR: use the event timestamp + ID as a composite key in Redis, not just the ID.
Ah, this is a known issue… Genesys sometimes retries on network blips, so event-id alone isn’t unique enough for strict deduplication. add a 10s TTL to your cache key like evt:${event.id}:${Math.floor(event.timestamp/1000)} and you’ll dodge the 500ms collision without extra overhead.