Interface IKafkaPartitionsAssignedCallback
Declares the OnPartitionsAssigned(IReadOnlyCollection<TopicPartition>, KafkaConsumer) event handler.
Namespace: Silverback.Messaging.Broker.Callbacks
Assembly: Silverback.Integration.Kafka.dll
Syntax
public interface IKafkaPartitionsAssignedCallback : IBrokerCallback
Methods
| Improve this doc View sourceOnPartitionsAssigned(IReadOnlyCollection<TopicPartition>, KafkaConsumer)
Called when a new consumer group partition assignment has been received by the consumer.
Declaration
IEnumerable<TopicPartitionOffset>? OnPartitionsAssigned(IReadOnlyCollection<TopicPartition> topicPartitions, KafkaConsumer consumer)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<TopicPartition> | topicPartitions | A collection of Confluent.Kafka.TopicPartition representing the assigned partitions. |
KafkaConsumer | consumer | The related consumer instance. |
Returns
Type | Description |
---|---|
IEnumerable<TopicPartitionOffset> |
Optionally returns the actual partitions to consume from and start offsets are specified by the
return value of the this set of partitions is not required to match the assignment provided by the
consumer group, but typically will. Partition offsets may be a specific offset, or special value (
When |