Class EntityFrameworkKafkaOffsetStore
- Namespace
- Silverback.Messaging.Consuming.KafkaOffsetStore
- Assembly
- Silverback.Storage.EntityFramework.dll
Stores the latest consumed offsets in EntityFramework.
public class EntityFrameworkKafkaOffsetStore : IKafkaOffsetStore
- Inheritance
-
EntityFrameworkKafkaOffsetStore
- Implements
- Inherited Members
Constructors
EntityFrameworkKafkaOffsetStore(EntityFrameworkKafkaOffsetStoreSettings, IServiceScopeFactory)
Initializes a new instance of the EntityFrameworkKafkaOffsetStore class.
public EntityFrameworkKafkaOffsetStore(EntityFrameworkKafkaOffsetStoreSettings settings, IServiceScopeFactory serviceScopeFactory)
Parameters
settingsEntityFrameworkKafkaOffsetStoreSettingsThe offset store settings.
serviceScopeFactoryIServiceScopeFactoryThe IServiceScopeFactory.
Methods
GetStoredOffsets(string)
Returns the stored offsets for the specified consumer group.
public IReadOnlyCollection<KafkaOffset> GetStoredOffsets(string groupId)
Parameters
groupIdstringThe consumer group id.
Returns
- IReadOnlyCollection<KafkaOffset>
The collection of KafkaOffset that have been stored.
StoreOffsetsAsync(string, IEnumerable<KafkaOffset>, ISilverbackContext?)
Stores the specified offsets.
public Task StoreOffsetsAsync(string groupId, IEnumerable<KafkaOffset> offsets, ISilverbackContext? context = null)
Parameters
groupIdstringThe consumer group id.
offsetsIEnumerable<KafkaOffset>The offsets.
contextISilverbackContextThe ISilverbackContext.