Class InMemoryOffsetStore
Used by the OffsetStoreExactlyOnceStrategy to keep track of the last processed offsets and guarantee that each message is processed only once.
The log is simply persisted in memory.
Inheritance
System.Object
InMemoryOffsetStore
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Silverback.Messaging.Inbound.ExactlyOnce.Repositories
Assembly: Silverback.Integration.dll
Syntax
public class InMemoryOffsetStore : TransactionalDictionary<string, IBrokerMessageOffset>, IOffsetStore, ITransactional
Constructors
| Improve this doc View sourceInMemoryOffsetStore(TransactionalDictionarySharedItems<String, IBrokerMessageOffset>)
Initializes a new instance of the InMemoryOffsetStore class.
Declaration
public InMemoryOffsetStore(TransactionalDictionarySharedItems<string, IBrokerMessageOffset> sharedItems)
Parameters
Type | Name | Description |
---|---|---|
TransactionalDictionarySharedItems<System.String, IBrokerMessageOffset> | sharedItems | The offsets shared between the instances of this repository. |
Methods
| Improve this doc View sourceGetLatestValueAsync(String, IConsumerEndpoint)
Declaration
public Task<IBrokerMessageOffset> GetLatestValueAsync(string offsetKey, IConsumerEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
System.String | offsetKey | |
IConsumerEndpoint | endpoint |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IBrokerMessageOffset> |
StoreAsync(IBrokerMessageOffset, IConsumerEndpoint)
Declaration
public Task StoreAsync(IBrokerMessageOffset offset, IConsumerEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
IBrokerMessageOffset | offset | |
IConsumerEndpoint | endpoint |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |