Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka producer configuration for all channels is not functioning #2906

Closed
akhalifeh79 opened this issue Feb 19, 2024 · 2 comments
Closed

Kafka producer configuration for all channels is not functioning #2906

akhalifeh79 opened this issue Feb 19, 2024 · 2 comments

Comments

@akhalifeh79
Copy link

As a referred in the following spring cloud documentation:
https://cloud.spring.io/spring-cloud-stream-binder-kafka/spring-cloud-stream-binder-kafka.html#kafka-producer-properties

Particularly this phrase

To avoid repetition, Spring Cloud Stream supports setting values for all channels, in the format of spring.cloud.stream.default.=.

I want to configure kafka producer for all channels using the "default" prefix but this is not functioning. I found a solution which is not respecting the official documentation, please see below the configuration the 2 configurations

correct configuration respecting documentation but not functioning

spring.cloud.stream.default.producer.sync=false
spring.cloud.stream.default.producer.batchTimeout=60000
spring.cloud.stream.default.producer.compression=gzip

functioning configuration but not respecting documentation

spring.cloud.stream.kafka.default.producer.sync=false
spring.cloud.stream.kafka.default.producer.batchTimeout=60000
spring.cloud.stream.kafka.default.producer.compression=gzip

Please confirm that the second configuration is correct and in this case update the official documentation.

I'm using the last version of spring cloud
<spring-cloud.version>2023.0.0</spring-cloud.version>

Thanks

@sobychacko
Copy link
Contributor

@akhalifeh79 Yes, that is a documentation mix-up. Are you open to fixing it by sending a PR?

@sobychacko
Copy link
Contributor

@akhalifeh79 The docs you linked above are from very old versions. The latest documentation can be found here. We made some adjustments to the snapshot docs to clarify the issues with the default properties on the Kafka bindings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants