Class IConsumerExtensions
Common extension methods for IConsumer<TKey, TValue> implementations.
Inheritance
System.Object
IConsumerExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Confluent.Kafka
Assembly: cs.temp.dll.dll
Syntax
public static class IConsumerExtensions
Methods
PositionTopicPartitionOffset<TKey, TValue>(IConsumer<TKey, TValue>, TopicPartition)
Gets the current position (offset) for the specified topic / partition.
The offset field of each requested partition will be set to the offset of the last consumed message + 1, or Offset.Unset in case there was no previous message consumed by this consumer.
The returned TopicPartitionOffset contains the leader epoch too.
Declaration
public static TopicPartitionOffset PositionTopicPartitionOffset<TKey, TValue>(this IConsumer<TKey, TValue> consumer, TopicPartition partition)
Parameters
Type | Name | Description |
---|---|---|
IConsumer<TKey, TValue> | consumer | |
TopicPartition | partition |
Returns
Type | Description |
---|---|
TopicPartitionOffset |
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
Exceptions
Type | Condition |
---|---|
KafkaException | Thrown if the request failed. |