Class OffsetsTracker
Keeps track of the offsets of the messages being produced or consumed.
Inheritance
System.Object
OffsetsTracker
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.Broker.Kafka
Assembly: Silverback.Integration.Kafka.dll
Syntax
public sealed class OffsetsTracker
Methods
| Improve this doc View sourceCommit(TopicPartitionOffset)
Marks the specified offset as committed.
Declaration
public void Commit(TopicPartitionOffset offset)
Parameters
Type | Name | Description |
---|---|---|
Confluent.Kafka.TopicPartitionOffset | offset | The offset to be marked as committed. |
GetCommitOffsets()
Gets the offsets to be used to commit after successful processing.
Declaration
public IReadOnlyCollection<KafkaOffset> GetCommitOffsets()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<KafkaOffset> | The offsets to be used to commit. |
GetRollbackOffSets()
Gets the offsets to be used to rollback in case of error.
Declaration
public IReadOnlyCollection<KafkaOffset> GetRollbackOffSets()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<KafkaOffset> | The offsets to be used to rollback. |
TrackOffset(TopicPartitionOffset)
Tracks the specified offset.
Declaration
public void TrackOffset(TopicPartitionOffset offset)
Parameters
Type | Name | Description |
---|---|---|
Confluent.Kafka.TopicPartitionOffset | offset | The offset to be tracked. |
TrackOffset(KafkaOffset)
Tracks the specified offset.
Declaration
public void TrackOffset(KafkaOffset offset)
Parameters
Type | Name | Description |
---|---|---|
KafkaOffset | offset | The offset to be tracked. |
UntrackAllPartitions()
Removes the tracked offset for all partitions.
Declaration
public void UntrackAllPartitions()
UntrackPartition(TopicPartition)
Removes the tracked offset for the specified partition.
Declaration
public void UntrackPartition(TopicPartition topicPartition)
Parameters
Type | Name | Description |
---|---|---|
Confluent.Kafka.TopicPartition | topicPartition | The partition to be untracked. |