TracingKafkaClientSupplier error "Implementations of KafkaClientSupplier should implement the getAdmin() method"

Viewed 727

I'm upgrading a Spring Boot application to Boot 2.6.1, Cloud 2021.0.0 and Cloud Stream 3.2.1.

This application has a bunch of KStreams such as:

    @Bean
    fun processEvent() =
        Function<KStream<ID, EventReceived>, KStream<Id, UpdatedInfo?>> { events ->
            ...
        }

Now the application crashes on startup:

Caused by: org.springframework.kafka.KafkaException: Could not start stream: ; nested exception is java.lang.UnsupportedOperationException: Implementations of KafkaClientSupplier should implement the getAdmin() method.
    at org.springframework.kafka.config.StreamsBuilderFactoryBean.start(StreamsBuilderFactoryBean.java:359)
    at org.springframework.cloud.stream.binder.kafka.streams.StreamsBuilderFactoryManager.start(StreamsBuilderFactoryManager.java:107)
    ... 15 common frames omitted
Caused by: java.lang.UnsupportedOperationException: Implementations of KafkaClientSupplier should implement the getAdmin() method.
    at org.apache.kafka.streams.KafkaClientSupplier.getAdmin(KafkaClientSupplier.java:40)
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:846)
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:711)
    at org.springframework.kafka.config.StreamsBuilderFactoryBean.start(StreamsBuilderFactoryBean.java:337)
    ... 16 common frames omitted

What could be the problem here?

UPDATE

I found that the problematic clientSupplier is brave.kafka.streams.TracingKafkaClientSupplier:

enter image description here

This class doesn't implement the expected method from KafkaClientSupplier (kafka-streams 3.0.0):

enter image description here

enter image description here

1 Answers
Related