#### [Abblix\.SharedSignals\.Redis](https://www.abblix.com/en/docs/api/abblix-sharedsignals-redis 'index')
### [Abblix\.SharedSignals\.Redis](https://www.abblix.com/en/docs/api/abblix-sharedsignals-redis/Abblix.SharedSignals.Redis 'Abblix\.SharedSignals\.Redis')

## ServiceCollectionExtensions Class

Wires the Redis\-native transmitter storage \- the event outbox and the stream registry \- into a
host's service collection\.

```csharp
public static class ServiceCollectionExtensions
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → ServiceCollectionExtensions
### Methods

## ServiceCollectionExtensions\.AddSharedSignalsRedisConfiguredStreams\(this IServiceCollection, IReadOnlyList\<ConfiguredStream\>\) Method {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_)}

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\.

```csharp
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](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_).services}

The service collection\.

###### `streams` [System\.Collections\.Generic\.IReadOnlyList&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[ConfiguredStream](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.ConfiguredStream 'Abblix\.SharedSignals\.Transmitter\.ConfiguredStream')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1') {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisConfiguredStreams(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,System.Collections.Generic.IReadOnlyList_Abblix.SharedSignals.Transmitter.ConfiguredStream_).streams}

The declared streams\.

#### Returns
[Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection '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 {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisDeliveryLease(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection)}

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\.

```csharp
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsRedisDeliveryLease(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
```
#### Parameters

###### `services` [Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisDeliveryLease(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection).services}

The service collection\.

#### Returns
[Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection '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 {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisOutbox(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Redis.RedisOutboxOptions)}

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\.

```csharp
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](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisOutbox(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Redis.RedisOutboxOptions).services}

The service collection\.

###### `options` [RedisOutboxOptions](https://www.abblix.com/en/docs/api/abblix-sharedsignals-redis/Abblix.SharedSignals.Redis.RedisOutboxOptions 'Abblix\.SharedSignals\.Redis\.RedisOutboxOptions') {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisOutbox(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection,Abblix.SharedSignals.Redis.RedisOutboxOptions).options}

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](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection')

## ServiceCollectionExtensions\.AddSharedSignalsRedisStreamStore\(this IServiceCollection\) Method {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisStreamStore(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection)}

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\.

```csharp
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsRedisStreamStore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
```
#### Parameters

###### `services` [Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection') {#Abblix.SharedSignals.Redis.ServiceCollectionExtensions.AddSharedSignalsRedisStreamStore(thisMicrosoft.Extensions.DependencyInjection.IServiceCollection).services}

The service collection\.

#### Returns
[Microsoft\.Extensions\.DependencyInjection\.IServiceCollection](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection 'Microsoft\.Extensions\.DependencyInjection\.IServiceCollection')
