Genesys Notification API: Kafka consumer dropping events after 5000ms

Node.js consumer is timing out on the /api/v2/analytics/queues/realtime endpoint. The WebSocket connection stays open, but the payload batch arrives in chunks that exceed the 5s processing window. Retrying the subscription doesn’t help. Here’s the consumer logic:

ws.on('message', (data) => {
 const events = JSON.parse(data);
 events.forEach(e => produce(e));
});

The produce call to Kafka is blocking. How do you handle backpressure without dropping the Genesys stream?