Table of Contents

Class PostgreSqlKafkaOffsetStore

Namespace
Silverback.Messaging.Consuming.KafkaOffsetStore
Assembly
Silverback.Storage.PostgreSql.dll

Stores the latest consumed offsets in PostgreSql.

public class PostgreSqlKafkaOffsetStore : IKafkaOffsetStore
Inheritance
PostgreSqlKafkaOffsetStore
Implements
Inherited Members

Constructors

PostgreSqlKafkaOffsetStore(PostgreSqlKafkaOffsetStoreSettings)

Initializes a new instance of the PostgreSqlKafkaOffsetStore class.

public PostgreSqlKafkaOffsetStore(PostgreSqlKafkaOffsetStoreSettings settings)

Parameters

settings PostgreSqlKafkaOffsetStoreSettings

The offset store settings.

Methods

GetStoredOffsets(string)

Returns the stored offsets for the specified consumer group.

public IReadOnlyCollection<KafkaOffset> GetStoredOffsets(string groupId)

Parameters

groupId string

The 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

groupId string

The consumer group id.

offsets IEnumerable<KafkaOffset>

The offsets.

context ISilverbackContext

The ISilverbackContext.

Returns

Task

A Task representing the asynchronous operation.