WebSocket analytics stream dropping events when piping to Kafka consumer

We’ve got a Node.js service running in Tokyo that subscribes to the Genesys Cloud notification API for real-time analytics. The goal is straightforward. Pull the WebSocket stream and push the payloads into a local Kafka topic for downstream processing. The connection establishes fine using the @genesys-cloud/sdk-notifications package, but the event throughput tanks after about four minutes.

Here’s the subscription setup:

const { NotificationClient } = require('@genesys-cloud/sdk-notifications');
const client = new NotificationClient({ environment: 'mypurecloud.com' });

client.subscribeToEvent('/api/v2/analytics/queues/realtime', {
 queueId: 'abc-123-def',
 interval: 10000
}).subscribe({
 next: (data) => kafkaProducer.send({ topic: 'gc-analytics', messages: [data] }),
 error: (err) => console.error('Stream broke:', err)
});

The next callback fires consistently for the first couple hundred messages. Then it just stops. No error callback triggers. The WebSocket connection state shows OPEN in the network tab, but Kafka gets nothing. I’ve added a manual heartbeat logger inside the subscription, and it confirms the client isn’t receiving frames after the stall.

Checked the token expiration logic. The SDK handles refresh automatically, so that’s not it. I’m wondering if the platform throttles analytics subscriptions when the consumer doesn’t acknowledge frames fast enough, or if there’s a missing keep-alive ping required on the JS side. The documentation mentions a maxAge parameter for the subscription request, but tweaking that to 30000 didn’t change the behavior.

Anyone else hit this wall with the Node.js notification client. We’re just trying to get a steady flow into the message queue without manual reconnect logic.