Class KEFCoreProducerAttribute
- Namespace
- MASES.EntityFrameworkCore.KNet.Metadata
- Assembly
- MASES.EntityFrameworkCore.KNet.dll
Overrides producer configuration for the Kafka topic associated with this entity type. Only explicitly set properties override the global ProducerConfig.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class KEFCoreProducerAttribute : Attribute
- Inheritance
-
KEFCoreProducerAttribute
- 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
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
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?
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?