The KafkaBinderConfigurationProperties class has dedicated properties for the producer and consumer. However, there is no admin properties.
While comparing with KafkaProperties which has the dedicated properties for producer, consumer and admin.
I would like to know are there specific reasons when designing KafkaBinderConfigurationProperties the admin properties were not considered.
So since I cannot configure specific admin properties using KafkaBinderConfigurationProperties, then other alternatives are using spring.cloud.stream.kafka.configuration.xxx or spring.kafka.admin.xxx.
Here are some short-comings of the above two alternatives I think,
spring.cloud.stream.kafka.consumer-properties.xxx
and spring.cloud.stream.kafka.producer-properties.xxx
to override the admin value.The binder will use the Boot spring.kafka.admin...
properties first, then apply any binder properties.
Finally, you can provide one or more AdminClientConfigCustomizer
beans to perform further overrides.
Customizing AdminClient Configuration
As with consumer and producer config customization above, applications can also customize the configuration for admin clients by providing an AdminClientConfigCustomizer. AdminClientConfigCustomizer’s configure method provides access to the admin client properties, using which you can define further customization. Binder’s Kafka topic provisioner gives the highest precedence for the properties given through this customizer. ...