Node.js Kafka consumer dropping Genesys WebSocket analytics events

Hey folks,

Building a Node.js service to push Genesys Cloud streaming analytics events to Kafka. The WebSocket connection stays alive, but I’m losing about 30% of the queue-stat events in the producer queue. The payload looks fine, just disappearing.

Here’s the snippet handling the message:

ws.on('message', (data) => {
 const event = JSON.parse(data);
 producer.send({ topic: 'analytics', messages: [{ value: JSON.stringify(event) }] });
});

Am I missing a backpressure check or is this a known SDK limitation?