Table of Contents

Interface IKafkaPartitionsAssignedCallback

Namespace
Silverback.Messaging.Broker.Callbacks
Assembly
Silverback.Integration.Kafka.dll
public interface IKafkaPartitionsAssignedCallback : IBrokerClientCallback

Methods

OnPartitionsAssigned(IReadOnlyCollection<TopicPartition>, IKafkaConsumer)

Called when a new consumer group partition assignment has been received by the consumer.

IEnumerable<TopicPartitionOffset>? OnPartitionsAssigned(IReadOnlyCollection<TopicPartition> topicPartitions, IKafkaConsumer consumer)

Parameters

topicPartitions IReadOnlyCollection<TopicPartition>

A collection of Confluent.Kafka.TopicPartition representing the assigned partitions.

consumer IKafkaConsumer

The related consumer instance.

Returns

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 ( Beginning, End or Unset). If Unset, consumption will resume from the last committed offset for each partition, or if there is no committed offset, in accordance with the auto.offset.reset configuration property.

When null the partitions assignment from the broker is taken and all offsets will be considered Unset.