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,
- For using spring.cloud.stream.kafka.configuration.xxx, if I want to configure some properties only to admin, then I have to also set anther two properties of
spring.cloud.stream.kafka.consumer-properties.xxx
andspring.cloud.stream.kafka.producer-properties.xxx
to override the admin value. - For using spring.kafka.admin.xxx, it may cause some inconsistencies of my configurations. Since I am configuring the kafka producer, consumer and admin clients with different properties.