question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kafka Streams instrumentation not compatible with kafka-streams 3.0.0

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
kurbanek-worldremitcommented, Mar 21, 2022

@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)

2reactions
fathimaSheikhcommented, Apr 12, 2022

@jeqo I’m using 5.13.8, but I still have the same issue.

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.

The code base https://github.com/openzipkin/brave/blob/master/instrumentation/kafka-clients/src/main/java/brave/kafka/clients/TracingConsumer.java does not have the changes needed to resolve the issue as the PR #1320 was not merged

Is there any workaround? or am I missing something?

I am using Spring Boot 2.6 and spring-cloud-sleuth version 3.1.1 which seems to using 5.13.7 version of io.zipkin.brave

I have overridden now to use latest version of 5.13.8 of io.zipkin.brave

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>

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found