Repository navigation
v5.1.0-beta.2
Pre-release
Pre-release
·
54 commits
to develop
since this release
Second preview of the upcoming 5.1.0, published for integration testing. Not for production.
Two additions on top of beta.1, both prompted by a real two-node deployment. Nothing in them is breaking; a single-node application is unaffected.
- Backplane guide — catch-up and cluster-aware observables have their own sections
- Changelog — the full list
What is new
- Cluster subjects —
AddSignalARRRClusterSubject<T>("name"),IClusterSubject<T>. The backplane routed the target of a send but never saw the source of a server stream: a hub method returning anIObservable<T>fed by an in-process subject streamed only what its own process raised. A cluster subject is an observable whose events reach subscribers on every node. Once locally, once remotely, never echoed; in order per publishing node; fire-and-forget for the producer,PublishAsyncfor the awaited variant. The event type is fixed at registration, so no type name travels on the wire. Works over Redis and Postgres; without a backplane it is a plain local subject. - Postgres catch-up after a subscription drop — on by default. Every envelope goes through the
messagestable and each node keeps a cursor. When its listener connection drops and comes back, the node replays what it missed, in order, before resuming live delivery. An outage longer thanMessageRetention(default five minutes) is reported as a gap rather than passed over silently.WithCatchUp(false)restores the Redis contract. New counters:signalarrr.backplane.listener.reconnects,signalarrr.backplane.messages.replayed,signalarrr.backplane.catch_up.gaps.
Installing
<PackageReference Include="Cocoar.SignalARRR.Server" Version="5.1.0-beta.2" />
<PackageReference Include="Cocoar.SignalARRR.Server.Backplane.Postgres" Version="5.1.0-beta.2" />builder.Services.AddSignalARRRPostgresBackplane(options => options
.WithConnectionString(connectionString)
.WithSchema("signalarrr")
.WithNodeId($"{Environment.MachineName}-api-1"));
builder.Services.AddSignalARRRClusterSubject<OrderChanged>("orders");The TypeScript and Swift packages are published at the same version for consistency; their content is unchanged since 5.0.0. npm publishes under the prerelease dist-tag.
Upgrading from beta.1
- The
messagestable gained two columns; the backplane adds them on startup (ALTER TABLE ... ADD COLUMN IF NOT EXISTS). WithWithAutoCreateSchema(false), re-runSignalARRRPostgresBackplaneSchema.GetCreateScript()through your migrations. - Catch-up is on by default, which means every envelope now costs a row write and a row read. That is the price of replay;
WithCatchUp(false)gives beta.1's behaviour back.
Worth knowing before you integrate
- One subject per event type.
IClusterSubject<T>is resolved byT, and two subjects cannot share a name. - Polymorphic payloads are yours to configure through
ClusterSubjectOptions.SerializerOptions; the library never resolves a type name from the wire. - Primary only, direct listener connection — unchanged from beta.1. The listener session is now tagged
application_name=signalarrr-backplane-listener:{nodeId}, so you can find it inpg_stat_activity.
Feedback
Please open an issue for anything that surprises you — particularly around ordering, duplicates, or what a node does after a reconnect, since that is what this preview is for.