Skip to main content
Version: 0.14.1

Subscriptions

A client that watches an instance subscribes and is told what changes; it never asks the same question again and again. A subscription opens with a snapshot of what its filter selects and goes on with events. Its queue is bounded, and a client that falls behind is given a fresh snapshot. On the shell projection one subscription stands from the moment the connection opens. This page gives what a subscription promises here, how a client filters, how each projection carries one, and what a subscription never does.

What a subscription promises​

#RuleOn this surface
1it begins with a snapshotthe record a read returns, for every subject the filter selects
2delivery is bounded per subscriberone queue of 256 events per subscription, not per connection
3an overflow is announced with a fresh snapshotthe announcement belongs to the subscription and is not an event; nobody else sees it
4events about one subject arrive in orderacross subjects nothing is promised
5what a client accumulates is a cachevalid while the subscription lives, never an authority; a client about to act asks the Core

The snapshot is taken at an event sequence and the stream resumes at the next one. The rules are the event model's; see a subscription.

What a client selects with​

Four independent axes, combined by conjunction. An axis the filter omits selects everything on it.

AxisForm
subjecta kind, or a kind and an identity
severitya floor: at or above a value
typeexactly, or by prefix, read as segments
occurrenceexactly, or by prefix; only events that carry one

See names and filtering.

On each projection​

The operator projectionThe shell projection
How one beginssubscribe, an operation whose answer is a streamone stands from the moment the connection opens
Its filterthe caller's, stated in the callevery subject, every type, no severity floor — until the caller replaces it
How manyone per call, as many calls as the client makesup to 8 on one connection, the standing one included
How one endsthe caller closes the streamthe caller cancels its call, or the connection ends

The standing subscription is an ordinary subscription: its call identity is reported when the connection opens, it may be replaced by subscribing with a narrower filter, and it may be cancelled.

Never confirmed here​

No operation on this surface acknowledges a position, and no field of a subscription requests one. A tool that falls behind is told so by an overflow and given a fresh snapshot. Confirmed subscriptions exist only where something depends on a consumer being current, which is the interface surface.

A connection that stops answering is closed on its transport's liveness, not on confirmation.

Not an authorisation​

Subscribing changes when a client learns something, never what it may learn. No filter widens what the surface entitles a caller to, and no event is carried to one client and withheld from another on the same surface.

Figures​

a subscription's queue256 events
the standing subscription's filterevery subject, every type, no severity floor
subscriptions per shell connection8
confirmationnone, on either projection