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 |
---|---|
Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]> | The Confluent.Kafka.IConsumer<TKey, TValue>. |
SetConfig(ConsumerConfig)
Sets the consumer configuration.
Declaration
IConfluentConsumerBuilder SetConfig(ConsumerConfig config)
Parameters
Type | Name | Description |
---|---|---|
Confluent.Kafka.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 |
---|---|---|
System.Action<Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]>, Confluent.Kafka.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 |
---|---|---|
System.Action<Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]>, Confluent.Kafka.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 |
---|---|---|
System.Action<Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]>, Confluent.Kafka.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 |
---|---|---|
System.Action<Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]>, System.Collections.Generic.List<Confluent.Kafka.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 |
---|---|---|
System.Func<Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]>, System.Collections.Generic.List<Confluent.Kafka.TopicPartition>, System.Collections.Generic.IEnumerable<Confluent.Kafka.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 |
---|---|---|
System.Action<Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]>, System.Collections.Generic.List<Confluent.Kafka.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 |
---|---|---|
System.Func<Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]>, System.Collections.Generic.List<Confluent.Kafka.TopicPartitionOffset>, System.Collections.Generic.IEnumerable<Confluent.Kafka.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 |
---|---|---|
System.Action<Confluent.Kafka.IConsumer<System.Byte[], System.Byte[]>, System.String> | statisticsHandler | The event handler. |
Returns
Type | Description |
---|---|
IConfluentConsumerBuilder | The IConfluentProducerBuilder so that additional calls can be chained. |