Skip to content

Limits

The limits that belong to the adapter, and the ones it inherits from NATS. Each says whether it can be worked around. The core's own limits are in what this module does not do.

A consumer deleted just after Subscribe is noticed late

When a JetStream consumer is deleted, the source ends, normally within milliseconds. nats.go learns of the delete only through a pull already waiting on the consumer, and it sends the first pull lazily. A delete that lands before that pull is noticed by nats.go's missing-heartbeat check instead, up to 30 seconds later.

Nothing hangs, and the source does end, with the cause messaging-nats: the pull consumer ended. This is a limit of the provider, measured on nats.go v1.54.0 and v1.55.0. It is tracked as messaging-nats#5 and set out in spec 0010.

The adapter's own link-death test works around it by waiting until the source's pull is on the server before it deletes the consumer.

AckWait also bounds how late a restart delivers

A message given back at retirement, either never handed over or in a handler's hand when the process stopped, is offered again at once while the server is up. A server restart forgets that, and offers the message again only when AckWait expires from its original delivery. So AckWait also bounds how late a message caught by a server restart arrives. The default is 30 seconds.

A restart can spend an attempt nobody saw

A redelivery that races a consumer's retirement is counted as sent and reaches no client. A live server offers it again under the same number, but a server restarted before the next pull has persisted it as delivered. With attempts left, the message still arrives, an attempt poorer. On its last attempt it is never offered again, and Exhausted does not count it.

This needs a Nak on the second-to-last attempt, the process retiring within milliseconds of it, and the NATS server restarting before anything pulls again. The gap is nats-server's, reported as messaging-nats#3, and the backend declares it as RestartCanSpendUnseenAttempt (spec 0012). No subscription setting avoids it.

A delayed message holds a MaxAckPending slot

A declined message waiting out a delay holds one of the consumer's MaxAckPending slots. The adapter leaves the server's default, which is 1000 in nats-server v2.15.1. A burst of declines with long delays can therefore stop the consumer being offered anything new until they fall due. The adapter has no setting for it. nats-server keeps the delay across its own restart.

No request and reply on JetStream

The JetStream backend declares no RequestReply. Use the Core backend for requests.

No routing around a wedged member

Neither backend routes a Competing group around a member whose queue is full; RoutesAroundDegraded is false on both. A queue group on core NATS does not route around a wedged member, as the adapter's resilience spike measured.

JetStream does not create streams

The backend binds to the operator's stream and never creates it. It refuses a memory-backed one. It creates the consumers it needs, under the subscription's DurableName, and never deletes them.

Durable fan-out needs one name for each replica

Under AtLeastOnce a durable name is one consumer on the server, and every process using it competes for its messages, whatever Shape it declared. Fan-out across replicas needs one DurableName for each replica. See Subscribe durably.

Core NATS keeps nothing

Core has no storage, so a message published while no subscriber is attached is gone, and a message shed at a full pending buffer is counted Refused and gone.