Why nats sub is not enough
The usual way to look at NATS is nats sub '>' in a terminal. It prints each message as it arrives.
That tells you what is in one message. It does not tell you what your system does.
When something is wrong, you ask different questions:
- Which subjects are active at this moment, and which subjects stopped?
- When did a service become slow, and when did it recover?
- What came after this message, on the other subjects?
These are questions about time. A picture of time gives the answer faster than a scrolling terminal.
streamview draws time from left to right, and gives each subject one lane. One message is one thin mark. When you zoom out, many messages become a bar, and a taller bar means more messages. All lanes use the same clock, so you can compare one subject with a different subject.
What you see on the timeline
The screenshots on this page are from a real NATS server with JetStream. They show the example of the NATS tutorial: a food-delivery system with four services that send messages only through NATS.
A slow service has a shape
In this example, a dinner rush comes every seven minutes. The kitchen cannot cook all orders, so it rejects some of them.

You did not write a query to find this, and you did not read a message. The red marks and the thinner lanes are visible as soon as you look at the page.
A changed payload is amber
A release of the courier service sent the distanceKm field as text, not as a number.

streamview learns the usual fields of each subject from its first 20 messages. You do not give it a schema. A message with a missing field, a new field, or a field of a different type gets a flag. How streamview flags an event has the details.
One order goes through many subjects
Click a message. streamview finds all messages that have the same correlation ID, on all subjects.

If your messages are plain JSON, tell streamview which field connects them, for example --correlation-field orderId.
streamview also reads the correlationid, Correlation-Id, and traceparent headers.
Get started
You need macOS or Linux, and Node.js for the NATS command.
- Install streamviewcurl -fsSL https://github.com/event-catalog/streamview/releases/latest/download/install.sh | sh
- Start it with the address of your NATS serverstreamview nats --servers localhost:4222
The first start installs the NATS adapter. This takes some seconds.
- Look at your subjects
The browser opens at
http://localhost:4747. Drag across the timeline to zoom in, and click a mark to open a message.
These options are useful for a first look:
| Option | What it does |
|---|---|
--subjects 'orders.>,payments.*' |
Reads only these subjects. You can use the * and > wildcards. |
--depth 2 |
Makes one lane from the subjects that have the same first two parts. |
--latest |
Does not read the history of the streams. |
--correlation-field orderId |
Connects the messages that have the same value in this field. |
Connect to NATS has all options.
If you do not have a NATS server, the NATS tutorial starts the example of this page with Docker.
You can also run streamview demo, which shows a mock order system and needs no setup.
Is it safe to connect it to a real server?
streamview only reads.
NATS sends each message to all subscriptions that match its subject. streamview makes a usual subscription, so it gets a copy. A queue group still gets each message once.
JetStream is different, because a consumer on some streams changes what the stream keeps. streamview looks at the retention of each stream before it reads it:
There are limits that you must know before you connect it to production:
- The page has no login. Each person who can open it can read all messages. By default, it accepts connections only from your computer.
- The NATS adapter has no TLS options. We did not test the login options against a server with authentication.
- streamview reads JSON. It does not decode Protobuf or other binary formats.
How streamview reads without taking messages and Limits have the full lists.
What happens, and what must happen
A timeline shows what happens on your subjects. It does not tell you what must happen:
- What is this subject for?
- Which services publish to it, and which services subscribe to it?
- Which schema do its messages have, and who owns it?
Those answers are documentation. For that, the same team makes EventCatalog, an open source tool that documents an event-driven architecture: the events, the channels such as NATS subjects, the services, the schemas, and the owners. EventCatalog also draws the architecture from that documentation, and it has an AsyncAPI integration.
The two views go together. The catalog tells you that kitchen.ready comes after kitchen.accepted.
The timeline shows you that during the dinner rush, it came much later.
streamview shows your subjects in real time. EventCatalog documents them: what each subject is for, which services use it, and who owns it.
Go to eventcatalog.devQuestions and answers
How do I visualize NATS subjects?
Install streamview, then run streamview nats --servers localhost:4222 with the address of your server. Your browser opens a live timeline with one lane for each subject. There is nothing to configure, and you do not write a schema.
Does streamview take messages from my queue groups?
No. streamview makes a usual subscription, by default to >. NATS sends a copy to it, and it still sends each message to one member of your queue group. streamview does not read work-queue streams or interest streams, because a consumer on those streams changes what your services get.
Does streamview show the history of a subject?
For a subject that a JetStream stream with limits retention stores, yes. streamview reads that stream from its first message with a temporary ordered consumer, and deletes the consumer when it stops. For all other subjects, it shows only the messages that come after it starts. Add --latest to skip the history.
My subjects contain IDs. Do I get one lane for each ID?
Add --depth with the number of subject parts that make one lane. With --depth 2, telemetry.courier.7 and telemetry.courier.8 are one lane, telemetry.courier. The full subject stays in the subject field of each message.
Can it connect to a server that needs a login or TLS?
streamview has --user and --password, --token, and --creds, but we did not test them against a server with authentication. The NATS adapter has no TLS options, and we did not test it with a hosted NATS service.
Do my messages need a schema or a special format?
No. streamview reads plain JSON messages and CloudEvents. It does not decode Protobuf or other binary formats.
Is streamview free?
Yes. streamview is open source with the Apache License 2.0. It runs on your computer, and it stores the messages in a file on your computer.
What is the difference between streamview and EventCatalog?
streamview shows the messages on your subjects in real time. EventCatalog documents your architecture, which includes what each subject is for, which services use it, and who owns it. The same team makes both, and both are open source.
Where to go next
All options, which include subject filters, `--depth`, the history of streams, and a login.
Watch a NATS systemA tutorial with an example food-delivery system on a real NATS server. You need only Docker.
Follow one orderConnect the messages of one order across subjects, and send the trace to a different person.
How streamview readsWhy streamview reads some streams and not others, and where the limits are.
More guides: Visualize Kafka topics, Visualize MQTT topics
