How to set the property acks = all in properties file of a spring boot application

1.1k Views Asked by At

I have tried the following spring.kafka.producer.acks= - 1 And spring.cloud.stream.kafka.binder.requiredAcks= - 1

Both are not working and my MessageChannel.send() is still returning true with all the brokers down

1

There are 1 best solutions below

0
On

To set acks=all use:

spring.cloud.stream.kafka.binder.producer-properties.acks=all

If you want to set for a particular channel, override as follows:

spring.cloud.stream.kafka.bindings.mytopicchannel.producer.configuration.acks=all

Ref: https://cloud.spring.io/spring-cloud-stream-binder-kafka/spring-cloud-stream-binder-kafka.html#_configuration_options