Configure KafkaAdmin for observation - #50454
henriquejsza wants to merge 1 commit into
Conversation
Allow KafkaTemplate and listener containers to use dedicated admin properties when looking up the Kafka cluster id for observation. Signed-off-by: henriquejsza <henriquejsza@gmail.com>
|
Thanks for the PR! I put it on hold as I'd like some clarity on what we're trying to achieve. I've asked on the linked issue. |
|
Thanks Stéphane, totally fair. I will pause this PR until the issue discussion defines the exact goal, then I will update it accordingly. |
|
Artem's follow-up in gh-38830 clarifies the intended scope: the existing auto-configured I'll keep the code paused (and avoid rebasing the current conflicts) until you confirm that this resolves the scope concern. Once confirmed, I'll rebase and refresh the validation. |
|
Thanks for trying but this doesn't go in the right direction so I am taking over. |
Closes gh-38830
This PR adds dedicated admin property groups for Kafka template and listener observation support. It allows the auto-configured
KafkaTemplateand listener containers to use internalKafkaAdmininstances configured fromspring.kafka.template.admin.*andspring.kafka.listener.admin.*when looking up the Kafka cluster id.The listener container customization composes with a user-provided
ContainerCustomizerso existing customization remains applied.Tests:
JAVA_HOME=/usr/lib/jvm/java-25-openjdk-amd64 ./gradlew :module:spring-boot-kafka:test --tests org.springframework.boot.kafka.autoconfigure.KafkaAutoConfigurationTests --tests org.springframework.boot.kafka.autoconfigure.ConcurrentKafkaListenerContainerFactoryConfigurerTestsJAVA_HOME=/usr/lib/jvm/java-25-openjdk-amd64 ./gradlew :module:spring-boot-kafka:checkFormat :module:spring-boot-kafka:checkstyleMain :module:spring-boot-kafka:checkstyleTestgit diff --check