Allow Kafka Admin Client's security protocol to be configured when using custom KafkaConnectionDetails #38342
Labels
status: pending-design-work
Needs design work before any code can be developed
theme: containers
Testcontainers, Docker Compose and Buildpack features
type: enhancement
A general enhancement
Spring Boot hardcodes Kafka Admin Client security protocol to PLAINTEXT if custom
KafkaConnectionDetails
is used. For producer and consumer it is easy to work around usingDefaultKafkaConsumerFactoryCustomizer
andDefaultKafkaProducerFactoryCustomizer
butAdminClient
doesn't have similar customizer. Which means we cannot configure it security protocol in code.Relevant piece of code:
spring-boot/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java
Lines 208 to 209 in 4a6762a
The only workaround I see is replacing
AdminClient
bean with custom one (which is not really desirable) or am I missing something?Spring Boot version: 3.1.4
The text was updated successfully, but these errors were encountered: