JetStream Demo
Explore streams, consumers, persistence, and message acknowledgment
ORDERS Stream
subjects: orders.> | 0 messages
Publish to Stream
Messages are persisted in the stream with sequence numbers.
Stream Info
Click on a message in the stream to see details.
ORDERS Stream
0 messages
Consumers
No consumers yet. Create one below.
Create Consumer
Consumer Actions
Each consumer tracks its own position independently. Click "Next" on a consumer to fetch and ack the next message.
Acknowledgment Demo
Fetch a message from the stream, then choose how to acknowledge it.
ack() - Message processed successfully, move on
nak() - Processing failed, redeliver immediately
term() - Permanent failure, do not retry
in_progress() - Still working, extend ack timeout
nak() - Processing failed, redeliver immediately
term() - Permanent failure, do not retry
in_progress() - Still working, extend ack timeout
Message Queue
EVENTS Stream
10 messages
Replay Policy
Choose where a new consumer should start reading from:
Exactly-Once with Deduplication
Use Nats-Msg-Id header to prevent duplicates. If the same ID is published twice, the server returns the existing sequence number.
How It Works
1. Publisher sends message with
2. Server stores message, returns
3. Network fails, publisher retries with same ID
4. Server recognizes duplicate, returns existing
5. No duplicate stored - exactly-once achieved!
Nats-Msg-Id: order-1232. Server stores message, returns
seq: 13. Network fails, publisher retries with same ID
4. Server recognizes duplicate, returns existing
seq: 15. No duplicate stored - exactly-once achieved!