A common community question is whether a “slow consumer” is a JetStream-only concept. It is not.
The term can be confusing because JetStream has a formal resource called a Consumer, but the phrase slow consumer predates JetStream. In NATS, a slow consumer is a client connection that is not receiving data fast enough, causing outbound data buffered for that client to exceed a server-side threshold.
A slow consumer condition occurs when NATS is sending more data to a client than that client can receive and process. This can happen with core NATS subscribers, JetStream consumers, service responders, leafnode-connected clients, or any other client connection receiving messages.
Common contributing factors include:
The important point is that slow consumer is about outbound pressure on a connection, not about whether the message originated from JetStream.
At a high level, the server detects that it cannot deliver data to a connection fast enough. In practice the slow consumer condition is triggered when either of these crosses a server-side limit:
write_deadline setting).Either case means the client is unable to keep up with the rate at which the server is trying to deliver messages to it.
When the server detects a slow consumer on a connection, it closes that connection and records the slow consumer event. Treat this as a backpressure signal: the client, network, or delivery pattern needs attention.
There are two especially useful server-side signals.
varz for aggregate slow consumer countsThe NATS server monitoring endpoint varz includes slow consumer statistics for the uptime of that server process.
For example, if your monitoring port is enabled on 8222:
curl http://localhost:8222/varzLook for the slow_consumers field in the JSON response.
This is useful for dashboards and alerting because it gives you an aggregate count since the server started. It does not, by itself, explain every individual client or application-level cause.
For real-time visibility into disconnects, subscribe to NATS system events:
1$SYS.ACCOUNT.*.DISCONNECTYou can also subscribe for a specific account instead of using the wildcard.
When a disconnect is caused by a slow consumer condition, the event payload’s reason field contains the text Slow Consumer. The full value also reflects the specific trigger — for example a pending-bytes limit or a write-deadline timeout — so match on the Slow Consumer substring rather than expecting a single exact string.
This is the more direct signal when you need to know when a slow consumer event occurs and which connection was disconnected as a result.
Access to $SYS subjects depends on your system account and authorization configuration, so make sure the monitoring user or service has the required permissions.
Server logs can be helpful during troubleshooting, but verbose and debug logs are often too dense to be the primary monitoring signal for slow consumers.
For routine operations, prefer structured signals:
varz for server-uptime aggregate counts.$SYS.ACCOUNT.*.DISCONNECT for real-time disconnect events and the disconnect reason.It is better to think of a slow consumer as a condition or event rather than a durable label you can query for the rest of a connection’s lifetime.
Because a server-detected slow consumer closes the affected connection, there is no live connection left to carry a persistent “slow consumer” status — the system disconnect event is the record of what happened. If you need historical reporting, capture and store the relevant monitoring data or system events in your own observability pipeline.
If you see slow consumers:
varz to confirm the server-level trend.$SYS.ACCOUNT.*.DISCONNECT to capture real-time disconnects and reasons.Slow consumers are not specific to JetStream. They indicate that a client connection cannot keep up with delivery. Monitor aggregate counts with varz, capture real-time disconnect reasons with $SYS events, and focus remediation on the subscriber, network, or delivery pattern creating backpressure.
Want help from the NATS experts? Meet with our architects to get help tailored to your use case and environment.



News and content from across the community