Kafka Streams instrumentation not compatible with kafka-streams 3.0.0
See original GitHub issueDescribe the Bug
A detailed description of this bug can be found on Stackoverflow: https://stackoverflow.com/questions/70382128/tracingkafkaclientsupplier-error-implementations-of-kafkaclientsupplier-should
Steps to Reproduce
Create a Spring Boot 2.6.1 application with Spring Cloud 2021.0.0, adding spring-cloud-sleuth to instrument it.
Expected Behaviour
The application should be instrumented correctly, not crashing at startup.
TracingKafkaClientSupplier
should override this method from KafkaClientSupplier
:
default Admin getAdmin(final Map<String, Object> config) {
throw new UnsupportedOperationException("Implementations of KafkaClientSupplier should implement the getAdmin() method.");
}
However the current implementation returns AdminClient
instead of Admin
, thus, throwing the default method exception:
@Override public AdminClient getAdminClient(Map<String, Object> config) {
return AdminClient.create(config);
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Upgrade Guide and API Changes - Apache Kafka
Notable compatibility changes in past releases. Downgrading from 3.0.x or newer version to 2.8.x or older version needs special attention: Since 3.0.0 release, ......
Read more >spring-cloud/spring-cloud-sleuth - Gitter
I did not create anything with new. My configuration is build by org.springframework.cloud.sleuth.instrument.messaging.SleuthKafkaStreamsConfiguration# ...
Read more >What's New in Apache Kafka 3.0.0 - Confluent
Streams used to default to the ByteArraySerde . Starting with 3.0, there is no default, and users are required to either set their...
Read more >Spring Cloud Sleuth customization
Spring Kafka Streams. This feature is available for Brave tracer implementation. We instrument the KafkaStreams KafkaClientSupplier so that tracing headers get ...
Read more >TracingKafkaClientSupplier error "Implementations of ...
... compatible with the 3.0.0 Kafka jars. In the meantime, you should be able to downgrade the kafka-clients and kafka-streams to 2.8.1.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@TYsewyn and @jeqo Could you move #1320 (with any dependencies) forward?
Currently dealing with:
java.lang.AbstractMethodError: Receiver class brave.kafka.clients.TracingConsumer does not define or inherit an implementation of the resolved method 'abstract java.util.OptionalLong currentLag(org.apache.kafka.common.TopicPartition)' of interface org.apache.kafka.clients.consumer.Consumer. at org.apache.kafka.streams.processor.internals.PartitionGroup.readyToProcess(PartitionGroup.java:143) at org.apache.kafka.streams.processor.internals.StreamTask.isProcessable(StreamTask.java:674) at org.apache.kafka.streams.processor.internals.StreamTask.process(StreamTask.java:694) at org.apache.kafka.streams.processor.internals.TaskManager.process(TaskManager.java:1193) at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:753) at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:583) at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:555)
Issue resolved by using 5.13.8 version of brave-instrumentation-kafka-clients
<dependency> <groupId>io.zipkin.brave</groupId> <artifactId>brave-instrumentation-kafka-clients</artifactId> <version>5.13.8</version> </dependency>