- Environment: Genesys Cloud (US1), Node.js v18 Consumer, EventBridge Schema
- Role: Playwright E2E Test Developer
- Timezone: America/Toronto
Running into a weird bug with my EventBridge consumer logic where I am receiving an excessive volume of conversation.end events that are irrelevant to my specific test suite. I am building a listener to validate post-call analytics for a specific support queue (queue-id-xyz), but the current subscription is broadcasting every single conversation end across the entire organization. This is causing memory leaks in my local test harness and failing my assertion timeouts.
I have attempted to apply filtering rules at the EventBridge bus level using the detail-type and source fields, but I cannot find a standard attribute in the payload that reliably maps to the queueId at the time of event ingestion. The documentation suggests using resources or detail, but the structure is inconsistent.
Here is the sample payload I am receiving:
{
"id": "event-uuid",
"detail-type": "conversation.end",
"source": "genesys.cloud",
"account": "123456",
"time": "2023-10-27T14:00:00Z",
"region": "us-east-1",
"resources": ["conversation/conv-uuid"],
"detail": {
"conversationId": "conv-uuid",
"type": "voice",
"state": "ended"
}
}
Notice that the detail object does not contain queueId. I have tried calling the /api/v2/conversations/voice/{conversationId} endpoint asynchronously within the consumer to fetch the queue metadata, but this introduces significant latency and race conditions in my E2E tests. Is there a way to inject the queueId into the EventBridge event details using a custom event bridge rule pattern, or should I be using the Genesys Cloud API to subscribe to a specific queue’s webhook instead? I need a deterministic way to filter these events before they hit my consumer logic.