Class KafkaProducerConfig
Extends the Confluent.Kafka.ProducerConfig adding the Silverback specific settings.
Inherited Members
Namespace: Silverback.Messaging.Configuration.Kafka
Assembly: Silverback.Integration.Kafka.dll
Syntax
public sealed class KafkaProducerConfig : ConfluentProducerConfigProxy, IValidatableEndpointSettings, IEquatable<KafkaProducerConfig>
Constructors
| Improve this doc View sourceKafkaProducerConfig(KafkaClientConfig?)
Initializes a new instance of the KafkaProducerConfig class.
Declaration
public KafkaProducerConfig(KafkaClientConfig? clientConfig = null)
Parameters
Type | Name | Description |
---|---|---|
KafkaClientConfig | clientConfig | The KafkaClientConfig to be used to initialize the KafkaProducerConfig. |
Properties
| Improve this doc View sourceAreDeliveryReportsEnabled
Gets a value indicating whether delivery reports are enabled according to the explicit configuration and Kafka defaults.
Declaration
public bool AreDeliveryReportsEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
DisposeOnException
Specifies whether the producer has to be disposed and recreated if a Confluent.Kafka.KafkaException
is thrown. The default is true
.
Declaration
public bool DisposeOnException { get; set; }
Property Value
Type | Description |
---|---|
bool |
FlushTimeout
Specifies the flush operation timeout. The default is 30 seconds.
Declaration
public TimeSpan FlushTimeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
ThrowIfNotAcknowledged
Specifies whether an exception must be thrown by the producer if the persistence is not acknowledge
by the broker. The default is true
.
Declaration
public bool ThrowIfNotAcknowledged { get; set; }
Property Value
Type | Description |
---|---|
bool |
TransactionInitTimeout
The transactions init operation timeout. The default is 30 seconds.
Declaration
public TimeSpan TransactionInitTimeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
| Improve this doc View sourceEquals(KafkaProducerConfig?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(KafkaProducerConfig? other)
Parameters
Type | Name | Description |
---|---|---|
KafkaProducerConfig | 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()