I can’t seem to figure out why my Spring Boot service is still receiving conversation.end events for queues I explicitly excluded in the EventBridge filter policy.
I am using the Genesys Cloud Java SDK to manage EventBridge subscriptions. According to the documentation for EventBridgeApi, the putEventBridgeSubscription method accepts a PutEventBridgeSubscriptionRequest which includes a filter object. The docs state: “The filter property allows you to specify criteria for the events that are sent to the subscription.” I have constructed a JSON filter that should theoretically restrict events to only those originating from a specific queue ID, yet my consumer logs show events from unrelated queues flooding in.
Here is the relevant snippet from my configuration service:
PutEventBridgeSubscriptionRequest request = new PutEventBridgeSubscriptionRequest();
request.setSubscriptionName("QueueSpecificEndEvents");
request.setDestination(new EventBridgeDestination().region("us-east-1").arn("arn:aws:sqs:us-east-1:123456789012:my-queue"));
// Attempting to filter by event type and queue ID
Map<String, Object> filterCriteria = new HashMap<>();
filterCriteria.put("type", Collections.singletonList("conversation.end"));
filterCriteria.put("queue_id", Collections.singletonList("e1234567-89ab-cdef-0123-456789abcdef"));
request.setFilter(new EventBridgeFilter().filter(filterCriteria));
eventBridgeApi.putEventBridgeSubscription(request);
When I inspect the EventBridge console in AWS, the filter policy shows up correctly. However, the conversation.end event payload contains a routing object with queue details, but the top-level event structure seems to vary. I suspect I am filtering on the wrong path or the SDK is not serializing the nested filter correctly. The docs are vague on whether queue_id is a valid top-level filter key or if I need to use a path like routing.queue.id. I am getting 201 Created when updating the subscription, so the API accepts it, but the filtering logic clearly fails in practice. Is there a specific schema version or attribute path I must use for queue-based filtering in the Java SDK?