1

I am getting the following exception while the producer is publishing the first message, I am trying to understand what the error means

Uncaught exception in thread 'kafka-producer-network-thread | producer-1': java.lang.AbstractMethodError: Method brave/kafka/clients/TracingProducer.close(Ljava/time/Duration;)V is abstract at brave.kafka.clients.TracingProducer.close(TracingProducer.java) ~[brave-instrumentation-kafka-clients-5.6.1.jar:na] at org.springframework.kafka.core.KafkaTemplate.closeProducer(KafkaTemplate.java:382) ~[spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE] at org.springframework.kafka.core.KafkaTemplate.lambda$buildCallback$4(KafkaTemplate.java:433) ~[spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE] at org.apache.kafka.clients.producer.KafkaProducer$InterceptorCallback.onCompletion(KafkaProducer.java:1318) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.ProducerBatch.completeFutureAndFireCallbacks(ProducerBatch.java:227) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.ProducerBatch.done(ProducerBatch.java:196) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.completeBatch(Sender.java:707) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.completeBatch(Sender.java:688) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.handleProduceResponse(Sender.java:596) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.access$100(Sender.java:74) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender$1.onComplete(Sender.java:798) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.ClientResponse.onComplete(ClientResponse.java:109) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.NetworkClient.completeResponses(NetworkClient.java:561) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:553) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:335) ~[kafka-clients-2.3.1.jar:na] at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:244) ~[kafka-clients-2.3.1.jar:na] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_201] 

1 Answer 1

3

Brave 5.6.1 is too old - it doesn't have the Producer.close() method that takes a Duration. It looks like it was added in 5.6.4.

https://github.com/openzipkin/brave/commit/23172461a41bd440ff88cd20a104e621aaa33801#diff-5a863eedbf226b573522c370b4de732a

Sign up to request clarification or add additional context in comments.

2 Comments

Added in version 5.6.4.
I am just stating the fact that the version you are using does not have the method that the KafkaTemplate calls. So, yes, you need to use a newer version; I am not familiar with brave or how the version is determined, or why you are using an incompatible version.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.