ServiceCollectionExtensions Class
Wires the Redis-native transmitter storage - the event outbox and the stream registry - into a host's service collection.
public static class ServiceCollectionExtensionsInheritance System.Object → ServiceCollectionExtensions
Methods
ServiceCollectionExtensions.AddSharedSignalsRedisConfiguredStreams(this IServiceCollection, IReadOnlyList<ConfiguredStream>) Method
Declares the transmitter's stream set as configuration and reconciles it into Redis, so the half of a stream its RECEIVER owns - the status it set, the subjects it added and removed, when it last asked for verification - is shared by every instance instead of living in the memory of whichever one took the request.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsRedisConfiguredStreams(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.ConfiguredStream> streams);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
streams System.Collections.Generic.IReadOnlyList<ConfiguredStream>
The declared streams.
Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection
Remarks
The file stays the truth about what a stream IS: on startup each declaration is written over what Redis holds, keeping the receiver's half, and a stream Redis holds that the file no longer declares is dropped. So editing configuration reaches every instance at its next start, and a pause reaches them all at once.
ServiceCollectionExtensions.AddSharedSignalsRedisDeliveryLease(this IServiceCollection) Method
Puts the push delivery claim on Redis, which is what stops several transmitter instances from delivering one stream's queue to its receiver several times over. A deployment running more than one instance needs this call: the default claim reaches only inside a process, so without it every instance believes it holds every stream.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsRedisDeliveryLease(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection
Remarks
Replace for the same reason as its siblings above - it IS the host's explicit choice and wins in any order relative to the role registration.
ServiceCollectionExtensions.AddSharedSignalsRedisOutbox(this IServiceCollection, RedisOutboxOptions) Method
Puts the transmitter's outbox on Redis's own structures - the choice for a transmitter
that scales beyond one replica, where a whole-queue-as-one-value outbox loses concurrent
mutations. The host registers its IConnectionMultiplexer; this call, like its
distributed-cache sibling, uses Replace so the explicit choice wins in any order
relative to the role registration.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsRedisOutbox(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Abblix.SharedSignals.Redis.RedisOutboxOptions? options=null);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
options RedisOutboxOptions
What the queue may keep, and for how long; the defaults apply when it is omitted. Registered with TryAdd, so a host pre-registering its own wins.
Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection
ServiceCollectionExtensions.AddSharedSignalsRedisStreamStore(this IServiceCollection) Method
Puts the transmitter's stream registrations on one Redis hash - the durable store for a
transmitter whose streams must outlive its process without a database of its own. The host
registers its IConnectionMultiplexer; this call uses Replace for the same reason as the
outbox above: it IS the host's explicit choice of store and wins in any registration order.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsRedisStreamStore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.