0

I have a spring boot application with Spring for Apache Kafka being used to send messages to topics on a kafka cluster. I've autowired a property for delivery.timeout.ms and after the application starts and the producer is configured, the application logs show the property's value was not set and it gives the warning: "WARN [task-scheduler-1] org.apache.kafka.clients.producer.ProducerConfig [] --- The configuration 'delivery.timeout.ms' was supplied but isn't a known config"

I've checked my POM and confirmed that I'm using the following two dependencies:

<dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
            <version>2.2.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>2.1.0</version>
        </dependency>

I've also confirmed that the property existed in version 2.1.0: https://kafka.apache.org/21/javadoc/org/apache/kafka/clients/producer/ProducerConfig.html

I see posts with a similiar warning for other properties mentioning that it can be ignored; however, my application is experiencing undesirable behavior which could be corrected by setting this property based on its description.

HendPro12
  • 1,094
  • 3
  • 17
  • 50
  • Same as [this](https://stackoverflow.com/a/55456262/4405757)? – Thiyagu Oct 03 '19 at 19:28
  • @user7 yes, I believe so. As I mentioned other posts mention it can be ignored. However, in my case it appears to not be getting set at all. – HendPro12 Oct 03 '19 at 19:29

1 Answers1

0

Looks like your kafka-clients version override is not working. I just tested it and it worked fine (with spring-kafka 2.2.9 and the 2.1.1 clients):

ProducerConfig values: 
    acks = 1
    batch.size = 16384
    bootstrap.servers = [localhost:9092]
    buffer.memory = 33554432
    client.dns.lookup = default
    client.id = 
    compression.type = none
    connections.max.idle.ms = 540000
    delivery.timeout.ms = 123456
    enable.idempotence = false
    ...

Try following the instructions in the Spring for Apache Kafka reference manual for overriding all the kafka client libraries.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • You are correct. Viewing the maven dependency tree is showing that a much older version of the library is being pulled in from somewhere and the one Ive specified is being excluded. – HendPro12 Oct 07 '19 at 20:37