Kafka new producer timeout

后端 未结 2 2020
-上瘾入骨i
-上瘾入骨i 2021-02-19 05:44

I\'m using the new kafka producer client and set the timeout.ms property to 50 ms.

Here is the complete configuration used in the producer:

props.put(\"         


        
2条回答
  •  执念已碎
    2021-02-19 06:15

    In the new Kafka 2.0 Producer API, you can use one of the following properties : https://kafka.apache.org/documentation/#producerconfigs

    See usage examples on https://kafka.apache.org/20/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html

    The timeout is now defined by the max.block.ms property.

提交回复
热议问题