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.
RoutesAroundDegradedisfalseon both. ACompetinggroup 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
AtMostOncealone, so a subscription asking forAtLeastOnceis refused at construction. It survives nothing, extends no lease, retains nothing to replay and delays no redelivery. - JetStream has no request and reply.
RequestReplyisfalse. A bus built on it refusesBus.RequestwithErrNotSupportedand refuses a subscription with aResponderat construction. Request and reply is the core backend's. - JetStream sheds only on its at-most-once path. Its declared
ShedNewestis core NATS's, and the at-most-once path is core NATS. UnderAtLeastOncethe core refusesShedNewestandShedOldest, and a slow handler applies backpressure instead. See Core NATS or JetStream. - JetStream can spend an attempt nobody saw.
RestartCanSpendUnseenAttemptistrue. After a narrow sequence involving a server restart, a message on its last attempt can be exhausted withoutExhaustedcounting it. See Limits. MaxRedeliveryDelayis 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.