Interface TopicProducerConfig

Configuration options for a topic producer

interface TopicProducerConfig {
    batchQueueSize?: number;
    batchSize?: number;
    compression?:
        | "none"
        | "gzip"
        | "snappy"
        | "lz4";
    lingerMs?: number;
    maxRequestSize?: number;
    timeoutMs?: number;
}

Properties

batchQueueSize?: number

Maximum number of records to include in a batch

batchSize?: number

Maximum size of a batch before it's sent automatically (in bytes)

compression?:
    | "none"
    | "gzip"
    | "snappy"
    | "lz4"

Compression algorithm to use for batches Supported values: "none", "gzip", "snappy", "lz4"

lingerMs?: number

Time in milliseconds to wait for additional records before sending a batch

maxRequestSize?: number

Maximum size of a single request in bytes

timeoutMs?: number

Maximum time in milliseconds to wait before sending a batch, even if not full