Skip to content

Capabilities

Each backend answers Capabilities() before anything is built. The fields are the core's; see the backend contract.

Field Core JetStream
Overflow ShedNewest ShedNewest
Patterns true true
DeliveryModes AtMostOnce AtMostOnce, AtLeastOnce
SurvivesRestart false true
RestartCanSpendUnseenAttempt false true
ExtendsLease false true
Ordered true true
Replays false true
RoutesAroundDegraded false false
DelaysRedelivery false true
MaxRedeliveryDelay zero zero, which with DelaysRedelivery means no limit
RequestReply true false
RestartLosesLastFailure false false

Source: (*core).Capabilities in core.go and (*jetStream).Capabilities in jetstream.go. A field not named in the source is false or zero.

The gaps, plainly

  • Neither backend routes around a wedged member. RoutesAroundDegraded is false on both. A Competing group on NATS is a queue group, and a queue group keeps sending to a member whose queue is full.
  • Core has no delivery guarantee above at-most-once. It declares AtMostOnce alone, so a subscription asking for AtLeastOnce is refused at construction. It survives nothing, extends no lease, retains nothing to replay and delays no redelivery.
  • JetStream has no request and reply. RequestReply is false. A bus built on it refuses Bus.Request with ErrNotSupported and refuses a subscription with a Responder at construction. Request and reply is the core backend's.
  • JetStream sheds only on its at-most-once path. Its declared ShedNewest is core NATS's, and the at-most-once path is core NATS. Under AtLeastOnce the core refuses ShedNewest and ShedOldest, and a slow handler applies backpressure instead. See Core NATS or JetStream.
  • JetStream can spend an attempt nobody saw. RestartCanSpendUnseenAttempt is true. After a narrow sequence involving a server restart, a message on its last attempt can be exhausted without Exhausted counting it. See Limits.
  • MaxRedeliveryDelay is unset. The adapter found no limit in the server's parsing of a delay (jetstream.go, "No limit found in the server's parsing").

What the capabilities mean here

SurvivesRestart on JetStream is a promise the deployment must keep, so Open refuses a memory-backed stream. See Bind to a stream.

Replays on JetStream means a new durable identity with StartAt: AllAvailable begins at the oldest message the stream still retains. StartAt applies at creation only.

Ordered means one subscriber receives one subject's messages in publication order. On JetStream it holds because a consumer delivers in order.

ExtendsLease on JetStream is InProgress sent every AckWait divided by three. See How JetStream settles and redelivers.