KafkaBinderConfigurationProperties does not handle dot-named kafka configuration properties
See original GitHub issueI recently updated spring-cloud-stream-binder-kafka to 1.2.0 from 1.1.2 using release train Camden.SR1 and somehow my application.yml that looked like this:
spring.cloud.stream.kafka.binder:
brokers: ${vcap.services.MH.credentials.kafka_brokers_sasl}
configuration:
security.protocol: SASL_SSL
sasl.mechanism: PLAIN
ssl.protocol: TLSv1.2
ssl.enabled.protocols: TLSv1.2
ssl.endpoint.identification.algorithm: HTTPS
did not work anymore. While debugging, I noticed that the field configuration
in KafkaBinderConfigurationProperties did not contain the entries ‘security.protocol’ as expected but an entry ‘security’, containing a map with an entry ‘protocol’. I had to change the configuration to the following to make it work:
spring.cloud.stream.kafka.binder:
brokers: ${vcap.services.MH.credentials.kafka_brokers_sasl}
configuration:
"[security.protocol]": SASL_SSL
"[sasl.mechanism]": PLAIN
"[ssl.protocol]": TLSv1.2
"[ssl.enabled.protocols]": TLSv1.2
"[ssl.endpoint.identification.algorithm]": HTTPS
Is it something that is expected ? I don’t see how the version number change alone would have caused such behavior change.
I am using spring-boot-starter-parent 1.5.2.RELEASE. I did not specified any specific spring cloud release train before but since my kafka service is based on version 0.10, I had to manually depend on spring-integration-kafka 2.1.0.RELEASE and kafka-clients 0.10.0.1, if this is in any way relevant.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
This is what my working application.properties ended up looking like:
spring.cloud.stream.kafka.binder.configuration.[security.protocol]=SASL_SSL spring.cloud.stream.kafka.binder.configuration.[sasl.mechanism]=PLAIN spring.cloud.stream.kafka.binder.configuration.[ssl.protocol]=TLSv1.2 spring.cloud.stream.kafka.binder.configuration.[ssl.enabled.protocols]=TLSv1.2 spring.cloud.stream.kafka.binder.configuration.[ssl.endpoint.identification.algorithm]=HTTPS
Thanks for the answer. I am having trouble using Ditmars.Release. It doesn’t seem to be in Maven Central yet and I am having dependency issues with other Spring packages if I don’t use the bom. Could you tell me what repository I can get it from? I think I’m missing something.
Thanks
Zoa
On Fri, Oct 27, 2017 at 11:49 AM, Sabby Anandan notifications@github.com wrote: