Interface IConfluentConsumerBuilder
- Namespace
- Silverback.Messaging.Broker.Kafka
- Assembly
- Silverback.Integration.Kafka.dll
The Confluent.Kafka.IConsumer<TKey, TValue> builder used by the KafkaConsumer.
public interface IConfluentConsumerBuilder
Methods
Build()
Builds the Confluent.Kafka.IConsumer<TKey, TValue> instance.
IConsumer<byte[]?, byte[]?> Build()
Returns
SetConfig(ConsumerConfig)
Sets the consumer configuration.
IConfluentConsumerBuilder SetConfig(ConsumerConfig config)
Parameters
configConsumerConfigThe configuration.
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.
SetErrorHandler(Action<IConsumer<byte[]?, byte[]?>, Error>)
Sets the handler to call on error events.
IConfluentConsumerBuilder SetErrorHandler(Action<IConsumer<byte[]?, byte[]?>, Error> errorHandler)
Parameters
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.
SetLogHandler(Action<IConsumer<byte[]?, byte[]?>, LogMessage>)
Set the handler to call when there is information available to be logged. If not specified, a default callback that writes to stderr will be used.
IConfluentConsumerBuilder SetLogHandler(Action<IConsumer<byte[]?, byte[]?>, LogMessage> logHandler)
Parameters
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.
SetOffsetsCommittedHandler(Action<IConsumer<byte[]?, byte[]?>, CommittedOffsets>)
Sets the handler to call on offsets committed events.
IConfluentConsumerBuilder SetOffsetsCommittedHandler(Action<IConsumer<byte[]?, byte[]?>, CommittedOffsets> offsetsCommittedHandler)
Parameters
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.
SetPartitionsAssignedHandler(Action<IConsumer<byte[]?, byte[]?>, List<TopicPartition>>)
Sets the handler to call on partitions assigned events.
IConfluentConsumerBuilder SetPartitionsAssignedHandler(Action<IConsumer<byte[]?, byte[]?>, List<TopicPartition>> partitionsAssignedHandler)
Parameters
partitionsAssignedHandlerAction<IConsumer<byte[], byte[]>, List<TopicPartition>>The event handler.
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.
SetPartitionsAssignedHandler(Func<IConsumer<byte[]?, byte[]?>, List<TopicPartition>, IEnumerable<TopicPartitionOffset>>)
Sets the handler to call on partitions assigned events.
IConfluentConsumerBuilder SetPartitionsAssignedHandler(Func<IConsumer<byte[]?, byte[]?>, List<TopicPartition>, IEnumerable<TopicPartitionOffset>> partitionsAssignedHandler)
Parameters
partitionsAssignedHandlerFunc<IConsumer<byte[], byte[]>, List<TopicPartition>, IEnumerable<TopicPartitionOffset>>The event handler.
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.
SetPartitionsRevokedHandler(Action<IConsumer<byte[]?, byte[]?>, List<TopicPartitionOffset>>)
Sets the handler to call on partitions revoked events.
IConfluentConsumerBuilder SetPartitionsRevokedHandler(Action<IConsumer<byte[]?, byte[]?>, List<TopicPartitionOffset>> partitionsRevokedHandler)
Parameters
partitionsRevokedHandlerAction<IConsumer<byte[], byte[]>, List<TopicPartitionOffset>>The event handler.
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.
SetPartitionsRevokedHandler(Func<IConsumer<byte[]?, byte[]?>, List<TopicPartitionOffset>, IEnumerable<TopicPartitionOffset>>)
Sets the handler to call on partitions revoked events.
IConfluentConsumerBuilder SetPartitionsRevokedHandler(Func<IConsumer<byte[]?, byte[]?>, List<TopicPartitionOffset>, IEnumerable<TopicPartitionOffset>> partitionsRevokedHandler)
Parameters
partitionsRevokedHandlerFunc<IConsumer<byte[], byte[]>, List<TopicPartitionOffset>, IEnumerable<TopicPartitionOffset>>The event handler.
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.
SetStatisticsHandler(Action<IConsumer<byte[]?, byte[]?>, string>)
Sets the handler to call on statistics events.
IConfluentConsumerBuilder SetStatisticsHandler(Action<IConsumer<byte[]?, byte[]?>, string> statisticsHandler)
Parameters
Returns
- IConfluentConsumerBuilder
The IConfluentConsumerBuilder so that additional calls can be chained.