Table of Contents

Class KEFCoreProducerAnnotation

Namespace
MASES.EntityFrameworkCore.KNet.Metadata.Internal
Assembly
MASES.EntityFrameworkCore.KNet.dll

Internal DTO stored as a model annotation to carry per-entity producer configuration overrides. Populated by KEFCoreProducerConvention from KEFCoreProducerAttribute or HasKEFCoreProducer(EntityTypeBuilder, AcksTypes?, int?, int?, CompressionTypes?, int?, int?, int?, int?, long?, long?).

public sealed class KEFCoreProducerAnnotation
Inheritance
KEFCoreProducerAnnotation
Inherited Members

Properties

Acks

Number of acknowledgments required before considering a write successful. 0 = no ack, 1 = leader only, -1/all = all replicas (default).

public ProducerConfigBuilder.AcksTypes? Acks { get; set; }

Property Value

ProducerConfigBuilder.AcksTypes?

BatchSize

Maximum size in bytes of a single batch sent to a partition. Default is 16384 (16 KB).

public int? BatchSize { get; set; }

Property Value

int?

BufferMemory

Total memory in bytes the producer can use to buffer records. Default is 33554432 (32 MB).

public long? BufferMemory { get; set; }

Property Value

long?

CompressionType

Compression type applied to record batches.

public ProducerConfigBuilder.CompressionTypes? CompressionType { get; set; }

Property Value

ProducerConfigBuilder.CompressionTypes?

DeliveryTimeoutMs

Upper bound in milliseconds for the total time a record may await delivery, including retries. Default is 120000 (2 minutes).

public int? DeliveryTimeoutMs { get; set; }

Property Value

int?

HasAnyValue

Returns true if at least one property is set.

public bool HasAnyValue { get; }

Property Value

bool

LingerMs

Delay in milliseconds to wait before sending a batch, allowing more records to accumulate. Higher values improve throughput at the cost of latency. Default is 1.

public int? LingerMs { get; set; }

Property Value

int?

MaxBlockMs

Maximum time in milliseconds to block when the buffer is full. Default is 60000 (60 seconds).

public long? MaxBlockMs { get; set; }

Property Value

long?

MaxInFlightRequestsPerConnection

Maximum number of unacknowledged requests per connection before blocking. Set to 1 to guarantee ordering when Retries > 0.

public int? MaxInFlightRequestsPerConnection { get; set; }

Property Value

int?

RequestTimeoutMs

Timeout in milliseconds for a single produce request to the broker. Default is 30000 (30 seconds).

public int? RequestTimeoutMs { get; set; }

Property Value

int?

Retries

Number of retries on transient failures. Default is 0.

public int? Retries { get; set; }

Property Value

int?