Class KafkaConsumerConfig
Extends the Confluent.Kafka.ConsumerConfig adding the Silverback specific settings.
Inherited Members
Namespace: Silverback.Messaging.Configuration.Kafka
Assembly: Silverback.Integration.Kafka.dll
Syntax
public sealed class KafkaConsumerConfig : ConfluentConsumerConfigProxy, IValidatableEndpointSettings, IEquatable<KafkaConsumerConfig>
Constructors
| Improve this doc View sourceKafkaConsumerConfig(KafkaClientConfig?)
Initializes a new instance of the KafkaConsumerConfig class.
Declaration
public KafkaConsumerConfig(KafkaClientConfig? clientConfig = null)
Parameters
Type | Name | Description |
---|---|---|
KafkaClientConfig | clientConfig | The KafkaClientConfig to be used to initialize the KafkaConsumerConfig. |
Properties
| Improve this doc View sourceCommitOffsetEach
Defines the number of message to be processed before committing the offset to the server. The most reliable level is 1 but it reduces throughput.
Declaration
public int CommitOffsetEach { get; set; }
Property Value
Type | Description |
---|---|
int |
EnableAutoRecovery
Specifies whether the consumer has to be automatically recycled when a Confluent.Kafka.KafkaException
is thrown while polling/consuming or an issues is detected (e.g. a poll timeout is reported). The default
is true
.
Declaration
public bool EnableAutoRecovery { get; set; }
Property Value
Type | Description |
---|---|
bool |
GroupId
Client group id string. All clients sharing the same group.id belong to the same group.
default: ''
importance: high.
Declaration
public override string GroupId { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
| Improve this doc View sourceIsAutoCommitEnabled
Gets a value indicating whether autocommit is enabled according to the explicit configuration and Kafka defaults.
Declaration
public bool IsAutoCommitEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsGroupIdSet
Returns a boolean indicating whether group.id is set.
Declaration
public bool IsGroupIdSet { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Improve this doc View sourceEquals(KafkaConsumerConfig?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(KafkaConsumerConfig? other)
Parameters
Type | Name | Description |
---|---|---|
KafkaConsumerConfig | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
| Improve this doc View sourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
| Improve this doc View sourceValidate()
Throws an EndpointConfigurationException if the current configuration is not valid.
Declaration
public override void Validate()