Table of Contents

Class KafkaProducerOptions

Namespace
Excalibur.Dispatch.Transport.Kafka
Assembly
Excalibur.Dispatch.Transport.Kafka.dll

Configuration options for the Kafka producer.

public sealed class KafkaProducerOptions
Inheritance
KafkaProducerOptions
Inherited Members
Extension Methods

Properties

Acks

Gets or sets the acknowledgment level for message delivery.

public KafkaAckLevel Acks { get; set; }

Property Value

KafkaAckLevel

The acks setting for the producer. Default is All.

AdditionalConfig

Gets additional producer configuration properties.

public Dictionary<string, string> AdditionalConfig { get; }

Property Value

Dictionary<string, string>

BatchSize

Gets or sets the maximum batch size in bytes.

public int BatchSize { get; set; }

Property Value

int

The maximum size of a message batch.

ClientId

Gets or sets the producer client ID.

public string ClientId { get; set; }

Property Value

string

The client ID used to identify the producer to the broker.

CompressionType

Gets or sets the compression type for messages.

public KafkaCompressionType CompressionType { get; set; }

Property Value

KafkaCompressionType

The compression algorithm to use.

EnableIdempotence

Gets or sets a value indicating whether to enable idempotent producer.

public bool EnableIdempotence { get; set; }

Property Value

bool

True to enable exactly-once semantics; otherwise, false.

EnableTransactions

Gets or sets a value indicating whether to enable transactional messaging.

public bool EnableTransactions { get; set; }

Property Value

bool

True to enable transactions; otherwise, false.

LingerMs

Gets or sets the maximum time to wait for a batch to fill.

public TimeSpan LingerMs { get; set; }

Property Value

TimeSpan

The linger time before sending a batch.

TransactionalId

Gets or sets the transactional ID for exactly-once processing.

public string? TransactionalId { get; set; }

Property Value

string

The transactional ID, required when EnableTransactions is true.