All Episodes
NATS.FM: What's new in NATS Server v2.11 release
Episode 13
•47:07•Apr 2, 2025Tomasz Pietrek, Maurice van Veen, and Neil Twigg discuss what’s new in NATS Server v2.11, including:
- Distributed Message Tracing
- Per-Message TTL (Time-To-Live)
- Consumer Priority Groups
- Multi-Message Get (Batch Get)
- Consumer Pause
Episode Summary
Topics covered in this episode include:
1. Distributed Message Tracing
Gain full visibility into message paths across complex NATS topologies — including clusters, gateways, leaf nodes, account boundaries, and subject mappings.
- Activated via a NATS-Trace header and supported directly in the CLI (nats trace $subject).
- Supports dry runs: trace a message’s route without delivering it, ideal for debugging or verification.
- Useful for both operators and developers to understand and verify message flow behavior.
2. Per-Message TTL (Time-To-Live)
Set expiration per message with the NATS-TTL header — allowing messages to age out individually, regardless of stream-level retention settings.
- TTLs are optional and per-message: not all messages need one, and TTL values can differ.
- Backed by an efficient timed hash wheel structure to minimize memory use.
- Major benefits for KV buckets — TTL-based deletion markers reduce storage and avoid manual compaction.
3. Consumer Priority Groups
A new mechanism for pull-based load balancing and resilience:
- Introduces overflow rules: clients can take over message delivery if primary clients are overwhelmed, using thresholds for pending messages or ACKs.
- Pinning: designate a single client to receive all messages until it fails, enabling failover patterns.
- One priority group per consumer in this release, designed to expand in the future.
- Enables simpler, cost-effective cross-region and zone-aware delivery strategies.
4. Multi-Message Get (Batch Get)
Efficient, stateless retrieval of multiple messages from a stream — without creating consumers.
- Supports multiple subject filters, time/sequence bounds, and returns data in sequence order.
- Ideal for querying the latest messages, previewing stream data, or powering internal state lookups.
- Foundational for upcoming KV/Object Store improvements and future batch operations.
5. Consumer Pause
Temporarily halt message delivery without tearing down the consumer or triggering client-side errors.
- Works with both push and pull consumers.
- Specify a pause_until deadline in the config — message flow resumes automatically afterward.
- Heartbeats continue, so clients stay connected and unaware of the pause.
- Valuable for maintenance, orchestration, or preventing unwanted consumption during deployments.
Additional Resources
- Read more about what’s new in v2.11 in the docs
- View the v2.11 release notes on GitHub
- Watch Neil present on NATS Server 2.11 at RethinkConn 2025