Subscription
A subscription: a name, a filter and exactly one handler. The checkpoint belongs to the name, so one handler never shares a checkpoint with another; a replay or a blue-green rebuild is a new name starting from the beginning.
startFrom applies only when the subscription has no checkpoint yet in a partition. decoder turns a committed stream into what the handler receives.
When models are given, the filter's event names are resolved through them (SubscriptionFilter.resolve): an event listed under its current name also matches the streams that stored it under a former one, and the other way round.
kind says what the handler is: it is reported as the function that handled a commit, and a wait chain may continue only after a saga's hop. A saga reports what it did with each entry (HandledEntry: the commands it derived, and the rejection that ended its hop), so it is made with saga; the constructor makes every other kind.
context is the bounded context the subscription belongs to: its filter's, except for a subscription that reads another context's published stream, which belongs to the context that declares it. A wait's hop names it in that context, and it signals as that context.
A subscription that coalesces is handed only the latest of an aggregate's entries that wait together in its lane (a batch): it keeps the latest of something per aggregate, so the earlier ones add nothing. Every entry of the batch completes, and is signalled, only once the latest is handled, so a wait on an earlier version reaches its hop when what holds the later one is written (the snapshot subscription's merged writes).
A stream that only changes schedules, its events all the system events wow.ScheduleSet and wow.ScheduleCancelled, is the application's to see only as a position: its subscriptions pass it over like an entry outside their filter. The built-in subscriptions (builtIn, and the snapshot's coalescing one) take it, so the timers are written, the snapshot keeps the aggregate's version and schedules, and the reservations it made are confirmed.
Constructors
Properties
The function a result names when this subscription handled a commit: of the subscription's own context, which a wait's hop names and the signal's source is, even when it reads another context's stream.
The handler's own in-process retry budget (@Retry), under the host's for this subscription and over its global one (SubscriptionOptions.retryOf); null when the handler gives none.