Configuration-Induced Delivery Failures in NATS JetStream: Detection and Remediation
cs.NI
Submitted: 2026-09-28
Updated: 2026-11-28
Comments: 5 pages, 4 figures, 5 tables
Code: https://github.com/biplabku/nats-lens
License: http://creativecommons.org/licenses/by/4.0/
The gist: NATS JetStream's at-least-once delivery guarantee is conditional: five common configuration mistakes silently violate it, causing duplicate message processing, data loss…
Terminology
Abstract
NATS JetStream's at-least-once delivery guarantee is conditional: five common configuration mistakes silently violate it, causing duplicate message processing, data loss, or redelivery storms with no error logged anywhere. The standard Prometheus NATS exporter exposes only server-level throughput metrics and cannot detect any of these failures. We present nats-lens, a standalone monitor that reads from the JetStream management API and detects all five violation classes without requiring changes to monitored applications or client code. We formally characterize each class with a precise condition, prove that standard Prometheus NATS metrics are structurally incapable of detecting any of them, and implement five targeted detectors. In a controlled evaluation of 30 rounds per scenario on both single-node and 3-node JetStream clusters, nats-lens achieves 100% detection coverage across all five classes---versus 0% for the baseline---with zero false positives over 30 minutes of healthy operation. Detection latency ranges from 2,003 ms to 8,013 ms (within three poll cycles). We confirm language-agnostic detection empirically using consumers in Rust, Go, and Python. The tool is open source and exposes findings through four output channels: web dashboard, Prometheus metrics, REST API, and NATS health events.
Related papers
- Minimizing Optical Circuit Reconfigurations for Concurrent Collectives
- Beyond the Next Hop: Measuring Data-Plane Forwarding for RPKI-Invalid Prefixes in the Wild
- Predicting Networks Before They Happen: Experimentation on a Real-Time V2X Digital Twin
- Cyber Resilience in Next-Generation Networks: Threat Landscape, Theoretical Foundations, and Design Paradigms
- MultiMoQ: Multi-Access Media-Over-QUIC for Robust Immersive Video Streaming
- AoA Services in 5G Networks: A Framework for Real-World Implementation and Systematic Testing