Class OffsetsTracker
- Namespace
- Silverback.Messaging.Broker.Kafka
- Assembly
- Silverback.Integration.Kafka.dll
Keeps track of the offsets of the messages being consumed.
public sealed class OffsetsTracker : IBrokerMessageIdentifiersTracker
- Inheritance
-
OffsetsTracker
- Implements
- Inherited Members
Constructors
OffsetsTracker()
public OffsetsTracker()
Methods
Commit(KafkaOffset)
Marks the specified offset as committed.
public void Commit(KafkaOffset offset)
Parameters
offsetKafkaOffsetThe offset to be marked as committed.
GetCommitOffsets()
Gets the offsets to be used to commit after successful processing.
public IReadOnlyCollection<KafkaOffset> GetCommitOffsets()
Returns
- IReadOnlyCollection<KafkaOffset>
The offsets to be used to commit.
GetRollbackOffSets()
Gets the offsets to be used to rollback in case of error.
public IReadOnlyCollection<KafkaOffset> GetRollbackOffSets()
Returns
- IReadOnlyCollection<KafkaOffset>
The offsets to be used to rollback.
TrackOffset(TopicPartitionOffset)
Tracks the specified offset.
public void TrackOffset(TopicPartitionOffset offset)
Parameters
offsetTopicPartitionOffsetThe offset to be tracked.
TrackOffset(KafkaOffset)
Tracks the specified offset.
public void TrackOffset(KafkaOffset offset)
Parameters
offsetKafkaOffsetThe offset to be tracked.
UntrackPartition(TopicPartition)
Removes the tracked offset for the specified partition.
public void UntrackPartition(TopicPartition topicPartition)
Parameters
topicPartitionTopicPartitionThe partition to be untracked.