Class ConfluentConsumerBuilder
Wraps the Confluent.Kafka.ConsumerBuilder<TKey, TValue>.
Implements
Inherited Members
Namespace: Silverback.Messaging.Broker.Kafka
Assembly: Silverback.Integration.Kafka.dll
Syntax
public class ConfluentConsumerBuilder : IConfluentConsumerBuilder
Methods
| Improve this doc View sourceBuild()
Builds the Confluent.Kafka.IConsumer<TKey, TValue> instance.
Declaration
public IConsumer<byte[]?, byte[]?> Build()
Returns
Type | Description |
---|---|
IConsumer<byte[], byte[]> | The Confluent.Kafka.IConsumer<TKey, TValue>. |
SetConfig(ConsumerConfig)
Sets the consumer configuration.
Declaration
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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. |