Configuration-Induced Delivery Failures in NATS JetStream: Detection and Remediation
Biplab Kumar Das
Key points
From the paper's conclusion- We confirm language-agnostic detection empirically using consumers in Rust, Go, and Python.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Gleaner: A Semantically-Rich and Efficient Online Sampler for Microservice DiagnosticsProceedings of the ACM on Software Engineering · 2026
- Distinguishing Process Change, Instrument Fault and Data-Path Corruption in Streaming Telemetry: A Reference Implementation and BenchmarkarXiv · 2026
- The Defect Is in the Arithmetic Between the Files: Static Detection of Exactly-Once Violations in Payment PipelinesarXiv · 2026
- Intelligent Learning Model for Anomaly Detection in Microservice ArchitectureComputers · 2026
- ARGUS: MCP-Grounded Root Cause Analysis for Kubernetes IncidentsarXiv · 2026
- AegisFlow: A Multi-Agent Agentic AI Framework for Autonomous Remediation and Self-Healing in Fragile Data EcosystemsarXiv · 2026