question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

KafkaBinderConfigurationProperties does not handle dot-named kafka configuration properties

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ngaworcommented, Jun 7, 2017

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

0reactions
zbuskecommented, Oct 31, 2017

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:

Hi, @zbuske https://github.com/zbuske. This PR was merged on the 1.3.x release line and it has been GA’d since early this month. See the release blog https://spring.io/blog/2017/10/06/spring-cloud-stream-1-3-goes-ga for more details.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/129#issuecomment-340024771, or mute the thread https://github.com/notifications/unsubscribe-auth/ANNok2W--8q-vTNICvu4wFH54c13ZKXdks5swgl9gaJpZM4NPSsR .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Cloud Stream Kafka Binder Reference Guide
This sets the default port when no port is configured in the broker list. Default: 9092 . spring.cloud.stream.kafka.binder.configuration. Key/Value map of ...
Read more >
Spring cloud stream kafka setting ssl properties ...
As in connect via creating bean ``` @Bean @Primary public KafkaBinderConfigurationProperties kafkaBinderConfigurationProperties( ...
Read more >
org.springframework.cloud.stream.binder.kafka.properties ...
KafkaBinderConfigurationProperties is not indexed? I have a Spring Boot project which uses Spring Cloud Stream Kafka Binder.
Read more >
Kafka Consumer Configurations for Confluent Platform
This can be used in combination with a larger session timeout to avoid group rebalances caused by transient unavailability (e.g. process restarts). If...
Read more >
Apache Kafka Reference Guide - Quarkus
When not provided this property defaults to localhost:9092 . 2, Configure the connector to manage the prices channel. By default, the topic name...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found