java.lang.ExceptionInInitializerError
Caused by: org.apache.kafka.common.KafkaException: Failed to construct kafka producer
at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:431)
at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:301)
at io.nonda.amazon.util.kafka.ProducerDemo.<clinit>(ProducerDemo.java:25)
Caused by: org.apache.kafka.common.config.ConfigException: delivery.timeout.ms should be equal to or larger than linger.ms + request.timeout.ms
at org.apache.kafka.clients.producer.KafkaProducer.configureDeliveryTimeout(KafkaProducer.java:485)
at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:394)
... 2 more
设置的delivery.timeout.ms值应该大于等于linger.ms + request.timeout.ms,我的request.timeout.ms和linger.ms,如下:
此处将delivery.timeout.ms设置30001,或者去掉这个设置,就可以