Interface IConfluentConsumerBuilder
The Confluent.Kafka.IConsumer<TKey, TValue> builder used by the KafkaConsumer.
Namespace: Silverback.Messaging.Broker.Kafka
Assembly: Silverback.Integration.Kafka.dll
Syntax
public interface IConfluentConsumerBuilder
Methods
| Improve this doc View sourceBuild()
Builds the Confluent.Kafka.IConsumer<TKey, TValue> instance.
Declaration
IConsumer<byte[]?, byte[]?> Build()
Returns
Type | Description |
---|---|
IConsumer<byte[], byte[]> | The Confluent.Kafka.IConsumer<TKey, TValue>. |
SetConfig(ConsumerConfig)
Sets the consumer configuration.
Declaration
IConfluentConsumerBuilder SetConfig(ConsumerConfig config)
Parameters
Type | Name | Description |
---|---|---|
ConsumerConfig | config | The configuration. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder so that additional calls can be chained. |
SetErrorHandler(Action<IConsumer<byte[]?, byte[]?>, Error>)
Sets the handler to call on error events.
Declaration
IConfluentConsumerBuilder SetErrorHandler(Action<IConsumer<byte[]?, byte[]?>, Error> errorHandler)
Parameters
Type | Name | Description |
---|---|---|
Action<IConsumer<byte[], byte[]>, Error> | errorHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder 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.
Declaration
IConfluentConsumerBuilder SetLogHandler(Action<IConsumer<byte[]?, byte[]?>, LogMessage> logHandler)
Parameters
Type | Name | Description |
---|---|---|
Action<IConsumer<byte[], byte[]>, LogMessage> | logHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder so that additional calls can be chained. |
SetOffsetsCommittedHandler(Action<IConsumer<byte[]?, byte[]?>, CommittedOffsets>)
Sets the handler to call on offsets committed events.
Declaration
IConfluentConsumerBuilder SetOffsetsCommittedHandler(Action<IConsumer<byte[]?, byte[]?>, CommittedOffsets> offsetsCommittedHandler)
Parameters
Type | Name | Description |
---|---|---|
Action<IConsumer<byte[], byte[]>, CommittedOffsets> | offsetsCommittedHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder so that additional calls can be chained. |
SetPartitionsAssignedHandler(Action<IConsumer<byte[]?, byte[]?>, List<TopicPartition>>)
Sets the handler to call on partitions assigned events.
Declaration
IConfluentConsumerBuilder SetPartitionsAssignedHandler(Action<IConsumer<byte[]?, byte[]?>, List<TopicPartition>> partitionsAssignedHandler)
Parameters
Type | Name | Description |
---|---|---|
Action<IConsumer<byte[], byte[]>, List<TopicPartition>> | partitionsAssignedHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder 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.
Declaration
IConfluentConsumerBuilder SetPartitionsAssignedHandler(Func<IConsumer<byte[]?, byte[]?>, List<TopicPartition>, IEnumerable<TopicPartitionOffset>> partitionsAssignedHandler)
Parameters
Type | Name | Description |
---|---|---|
Func<IConsumer<byte[], byte[]>, List<TopicPartition>, IEnumerable<TopicPartitionOffset>> | partitionsAssignedHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder so that additional calls can be chained. |
SetPartitionsRevokedHandler(Action<IConsumer<byte[]?, byte[]?>, List<TopicPartitionOffset>>)
Sets the handler to call on partitions revoked events.
Declaration
IConfluentConsumerBuilder SetPartitionsRevokedHandler(Action<IConsumer<byte[]?, byte[]?>, List<TopicPartitionOffset>> partitionsRevokedHandler)
Parameters
Type | Name | Description |
---|---|---|
Action<IConsumer<byte[], byte[]>, List<TopicPartitionOffset>> | partitionsRevokedHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder 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.
Declaration
IConfluentConsumerBuilder SetPartitionsRevokedHandler(Func<IConsumer<byte[]?, byte[]?>, List<TopicPartitionOffset>, IEnumerable<TopicPartitionOffset>> partitionsRevokedHandler)
Parameters
Type | Name | Description |
---|---|---|
Func<IConsumer<byte[], byte[]>, List<TopicPartitionOffset>, IEnumerable<TopicPartitionOffset>> | partitionsRevokedHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder so that additional calls can be chained. |
SetStatisticsHandler(Action<IConsumer<byte[]?, byte[]?>, string>)
Sets the handler to call on statistics events.
Declaration
IConfluentConsumerBuilder SetStatisticsHandler(Action<IConsumer<byte[]?, byte[]?>, string> statisticsHandler)
Parameters
Type | Name | Description |
---|---|---|
Action<IConsumer<byte[], byte[]>, string> | statisticsHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder so that additional calls can be chained. |