We’re piping routing:queue:stats:updated events into a Node.js EventEmitter for the CI monitor and payloads drop when conversations update at the same time.
Error
TypeError: Cannot read properties of undefined (reading 'conversationId')
at Object.<anonymous> (/github/workspace/monitor.js:42:25)
The default listener limit chokes when queue stats and conversation updates hit at the same time, and it’s usually breaking the metadata chain for any downstream bulk export jobs. Try bumping the cap or routing through a simple Redis queue to batch those payloads. What exact payload structure triggers the undefined error on your end?
Bumping setMaxListeners helps, but it’s usually unhandled backpressure when queue stats and chat widget updates fire at once.
Drop a screenshot of your payload schema if that conversationId keeps returning null, and wrap the listener in a lightweight async queue like p-queue to stop the event loop from choking.
Double check the bot flow routing rules too, since overlapping chat and email media types often trigger those undefined property reads.
Dropping conversation events usually breaks the adherence tracking in WEM. When the queue stats miss a beat, it’s marking agents as idle during wrap-up, which drives down your service level metrics. Are you routing these updates through a specific management unit? Best to verify the configuration before the next shift starts.