SSE connections previously created regular push consumers without durable names. When browsers disconnected uncleanly or the API restarted, these orphaned consumers persisted on the NATS server and continued draining messages — each restart added more, eventually saturating the API at 100% CPU. Switched to ordered_consumer=True which: - Creates ephemeral consumers with no server-side ack state - Auto-cleans on disconnect (no orphans) - Still delivers new messages in real-time for SSE Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12 KiB
12 KiB