Class InMemoryKafkaOffsetStore
Stores the latest consumed offsets in memory.
Implements
Inherited Members
Namespace: Silverback.Messaging.Consuming.KafkaOffsetStore
Assembly: Silverback.Storage.Memory.dll
Syntax
public class InMemoryKafkaOffsetStore : IKafkaOffsetStore
Constructors
InMemoryKafkaOffsetStore()
Stores the latest consumed offsets in memory.
Declaration
public InMemoryKafkaOffsetStore()
Methods
GetStoredOffsets(string)
Returns the stored offsets for the specified consumer group.
Declaration
public IReadOnlyCollection<KafkaOffset> GetStoredOffsets(string groupId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | groupId | The consumer group id. |
Returns
| Type | Description |
|---|---|
| IReadOnlyCollection<KafkaOffset> | The collection of KafkaOffset that have been stored. |
StoreOffsetsAsync(string, IEnumerable<KafkaOffset>, ISilverbackContext?)
Stores the specified offsets.
Declaration
public Task StoreOffsetsAsync(string groupId, IEnumerable<KafkaOffset> offsets, ISilverbackContext? context = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | groupId | The consumer group id. |
| IEnumerable<KafkaOffset> | offsets | The offsets. |
| ISilverbackContext | context | The ISilverbackContext. |
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |