Maximum number of messages and the maximum publish latency是哪两个属性

Batching

When batching is enabled, the producer accumulates and sends a batch of messages in a single request. The batch size is defined by the maximum number of messages and the maximum publish latency.

文档中的介绍。

Producer<String> producer = client.newProducer(Schema.STRING)
        .topic(topic)
        .sendTimeout(30, TimeUnit.SECONDS)
        .enableBatching(true)
        .batchingMaxMessages(1000)
        .batchingMaxBytes(1000)
        .batchingMaxPublishDelay(10, TimeUnit.MILLISECONDS)
        .create();