Node.js consumer is timing out when querying queue analytics. 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?