#### [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')

## RedisStreamStore Class

Stream registrations on one Redis hash: the durable [IStreamStore](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore 'Abblix\.SharedSignals\.Transmitter\.IStreamStore') for a transmitter
whose streams must outlive its process, without a database of its own\.

```csharp
public sealed class RedisStreamStore : Abblix.SharedSignals.Transmitter.IStreamStore
```

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

Implements [IStreamStore](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore 'Abblix\.SharedSignals\.Transmitter\.IStreamStore')

### Remarks

One hash rather than a key per stream, because the dispatcher's view is "every stream at
            once" on every event: HGETALL over a transmitter's registrations beats a SCAN walking a shared
            keyspace, and a single key stays valid under Redis Cluster without hash-tag ceremony. The cost of
            that shape is that the whole registry travels on every dispatched event and lives on one cluster
            slot - fine for the tens of receivers a transmitter serves, and the reason this store is not the
            answer for thousands.

The key carries the transmitter's own issuer, so two deployments sharing one Redis - a
            staging and a production, two products - keep separate registries. Without it they would share a
            hash, and each would read the other's streams out of [ListAllAsync\(CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals-redis/Abblix.SharedSignals.Redis.RedisStreamStore#Abblix.SharedSignals.Redis.RedisStreamStore.ListAllAsync(System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Redis\.RedisStreamStore\.ListAllAsync\(System\.Threading\.CancellationToken\)') and deliver its own
            signed events to the other's receivers.

Losing Redis loses registrations - deliberately a tier below a database. The consequence is
            worth stating plainly: the transmitter stops delivering to everybody until each receiver creates
            its stream again (SSF 1.0 Section 8.1.1.1), and whether a receiver ever does is a property of that
            receiver, not of the protocol. A deployment that cannot accept that keeps its registrations in its
            own database, which is what the interface is for.

Registrations carry the receivers' delivery credentials
            (`authorization_header`), so this Redis holds secrets and deserves the protection of one:
            TLS, authentication, and a database of its own.
### Constructors

## RedisStreamStore\(IConnectionMultiplexer, SharedSignalsTransmitterOptions\) Constructor {#Abblix.SharedSignals.Redis.RedisStreamStore.RedisStreamStore(StackExchange.Redis.IConnectionMultiplexer,Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions)}

Stream registrations on one Redis hash: the durable [IStreamStore](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore 'Abblix\.SharedSignals\.Transmitter\.IStreamStore') for a transmitter
whose streams must outlive its process, without a database of its own\.

```csharp
public RedisStreamStore(StackExchange.Redis.IConnectionMultiplexer connection, Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions options);
```
#### Parameters

###### `connection` [StackExchange\.Redis\.IConnectionMultiplexer](https://learn.microsoft.com/en-us/dotnet/api/stackexchange.redis.iconnectionmultiplexer 'StackExchange\.Redis\.IConnectionMultiplexer') {#Abblix.SharedSignals.Redis.RedisStreamStore.RedisStreamStore(StackExchange.Redis.IConnectionMultiplexer,Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions).connection}

The Redis connection; opening and configuring it is the host's\.

###### `options` [SharedSignalsTransmitterOptions](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions 'Abblix\.SharedSignals\.Transmitter\.SharedSignalsTransmitterOptions') {#Abblix.SharedSignals.Redis.RedisStreamStore.RedisStreamStore(StackExchange.Redis.IConnectionMultiplexer,Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions).options}

The transmitter's options, read for the issuer the key is scoped by\.

### Remarks

One hash rather than a key per stream, because the dispatcher's view is "every stream at
            once" on every event: HGETALL over a transmitter's registrations beats a SCAN walking a shared
            keyspace, and a single key stays valid under Redis Cluster without hash-tag ceremony. The cost of
            that shape is that the whole registry travels on every dispatched event and lives on one cluster
            slot - fine for the tens of receivers a transmitter serves, and the reason this store is not the
            answer for thousands.

The key carries the transmitter's own issuer, so two deployments sharing one Redis - a
            staging and a production, two products - keep separate registries. Without it they would share a
            hash, and each would read the other's streams out of [ListAllAsync\(CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals-redis/Abblix.SharedSignals.Redis.RedisStreamStore#Abblix.SharedSignals.Redis.RedisStreamStore.ListAllAsync(System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Redis\.RedisStreamStore\.ListAllAsync\(System\.Threading\.CancellationToken\)') and deliver its own
            signed events to the other's receivers.

Losing Redis loses registrations - deliberately a tier below a database. The consequence is
            worth stating plainly: the transmitter stops delivering to everybody until each receiver creates
            its stream again (SSF 1.0 Section 8.1.1.1), and whether a receiver ever does is a property of that
            receiver, not of the protocol. A deployment that cannot accept that keeps its registrations in its
            own database, which is what the interface is for.

Registrations carry the receivers' delivery credentials
            (`authorization_header`), so this Redis holds secrets and deserves the protection of one:
            TLS, authentication, and a database of its own.
### Methods

## RedisStreamStore\.DeleteAsync\(string, string, CancellationToken\) Method {#Abblix.SharedSignals.Redis.RedisStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken)}

Deletes a stream \(SSF 1\.0 Section 8\.1\.1\.5\)\.

```csharp
public System.Threading.Tasks.Task<bool> DeleteAsync(string receiverId, string streamId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `receiverId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.SharedSignals.Redis.RedisStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken).receiverId}

The receiver the stream belongs to\.

###### `streamId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.SharedSignals.Redis.RedisStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken).streamId}

The stream's identifier\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.SharedSignals.Redis.RedisStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [DeleteAsync\(string, string, CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.DeleteAsync(string,string,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.DeleteAsync\(System\.String,System\.String,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
True when deleted; false when no such stream existed\.

## RedisStreamStore\.FindAsync\(string, string, CancellationToken\) Method {#Abblix.SharedSignals.Redis.RedisStreamStore.FindAsync(string,string,System.Threading.CancellationToken)}

Finds one stream of one receiver\.

```csharp
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.StreamState?> FindAsync(string receiverId, string streamId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `receiverId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.SharedSignals.Redis.RedisStreamStore.FindAsync(string,string,System.Threading.CancellationToken).receiverId}

The receiver the stream belongs to\.

###### `streamId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.SharedSignals.Redis.RedisStreamStore.FindAsync(string,string,System.Threading.CancellationToken).streamId}

The stream's identifier\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.SharedSignals.Redis.RedisStreamStore.FindAsync(string,string,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [FindAsync\(string, string, CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.FindAsync(string,string,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.FindAsync\(System\.String,System\.String,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[StreamState](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
The stream's state, or null when no such stream exists for this receiver\.

## RedisStreamStore\.ListAllAsync\(CancellationToken\) Method {#Abblix.SharedSignals.Redis.RedisStreamStore.ListAllAsync(System.Threading.CancellationToken)}

Lists every stream of every receiver \- the dispatcher's view, since an event is matched
against all streams at once\.

```csharp
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.StreamState>> ListAllAsync(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.SharedSignals.Redis.RedisStreamStore.ListAllAsync(System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [ListAllAsync\(CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.ListAllAsync(System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.ListAllAsync\(System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Collections\.Generic\.IReadOnlyList&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[StreamState](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')

## RedisStreamStore\.ListAsync\(string, CancellationToken\) Method {#Abblix.SharedSignals.Redis.RedisStreamStore.ListAsync(string,System.Threading.CancellationToken)}

Lists the streams of one receiver, for the list form of the configuration read
\(SSF 1\.0 Section 8\.1\.1\.2\)\. An empty list is a receiver with no streams, never an error\.

```csharp
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.StreamState>> ListAsync(string receiverId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `receiverId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.SharedSignals.Redis.RedisStreamStore.ListAsync(string,System.Threading.CancellationToken).receiverId}

The receiver whose streams are listed\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.SharedSignals.Redis.RedisStreamStore.ListAsync(string,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [ListAsync\(string, CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.ListAsync(string,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.ListAsync\(System\.String,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Collections\.Generic\.IReadOnlyList&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[StreamState](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlylist-1 'System\.Collections\.Generic\.IReadOnlyList\`1')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')

## RedisStreamStore\.TryCreateAsync\(StreamState, CancellationToken\) Method {#Abblix.SharedSignals.Redis.RedisStreamStore.TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken)}

Stores a new stream\.

```csharp
public System.Threading.Tasks.Task<bool> TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState stream, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `stream` [StreamState](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState') {#Abblix.SharedSignals.Redis.RedisStreamStore.TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken).stream}

The stream's initial state\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.SharedSignals.Redis.RedisStreamStore.TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [TryCreateAsync\(StreamState, CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.TryCreateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.TryCreateAsync\(Abblix\.SharedSignals\.Transmitter\.StreamState,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
True when stored; false when a stream with the same receiver and identifier
            already exists\.

## RedisStreamStore\.UpdateAsync\(StreamState, CancellationToken\) Method {#Abblix.SharedSignals.Redis.RedisStreamStore.UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken)}

Replaces a stream's state with a new snapshot, keyed by its receiver and identifier\.

```csharp
public System.Threading.Tasks.Task<bool> UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState stream, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
```
#### Parameters

###### `stream` [StreamState](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.StreamState 'Abblix\.SharedSignals\.Transmitter\.StreamState') {#Abblix.SharedSignals.Redis.RedisStreamStore.UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken).stream}

The new state\.

###### `cancellationToken` [System\.Threading\.CancellationToken](https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken 'System\.Threading\.CancellationToken') {#Abblix.SharedSignals.Redis.RedisStreamStore.UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken).cancellationToken}

Cancels I/O a durable implementation performs\.

Implements [UpdateAsync\(StreamState, CancellationToken\)](https://www.abblix.com/en/docs/api/abblix-sharedsignals/Abblix.SharedSignals.Transmitter.IStreamStore#Abblix.SharedSignals.Transmitter.IStreamStore.UpdateAsync(Abblix.SharedSignals.Transmitter.StreamState,System.Threading.CancellationToken) 'Abblix\.SharedSignals\.Transmitter\.IStreamStore\.UpdateAsync\(Abblix\.SharedSignals\.Transmitter\.StreamState,System\.Threading\.CancellationToken\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
True when replaced; false when no such stream exists to replace\.
