-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
In what version(s) of Spring for Apache Kafka are you seeing this issue?
3.0.10
Describe the bug
When enabling observabiity it tries to bring up AdminClient to retrieve clusterId even if adminClient auto-create is set to false.
When admin connection is blocked on other side it causes timeouts.
With default admin operation timeout message processing goes to a crawl as it tries to retrieve it on each message.
To Reproduce
@Bean
fun kafkaListenerContainerFactory(consumerFactory: ConsumerFactory<String?, String?>): ConcurrentKafkaListenerContainerFactory<String, String> {
val factory = ConcurrentKafkaListenerContainerFactory<String, String>()
factory.containerProperties.isObservationEnabled = true
factory.consumerFactory = consumerFactory
return factory
}
Expected behavior
I would expect that when adminClient is disabled clusterId will be ignored or at least that we have a possibility to customize:
https://github.com/spring-projects/spring-kafka/blob/main/spring-kafka/src/main/java/org/springframework/kafka/support/micrometer/KafkaRecordReceiverContext.java
To not to try reading clusterId.
Sample
A link to a GitHub repository with a minimal, reproducible, sample.
Reports that include a sample will take priority over reports that do not.
At times, we may require a sample, so it is good to try and include a sample up front.