Debasish
Debasish

Reputation: 1

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

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

Upvotes: 0

Views: 1487

Answers (1)

awgtek
awgtek

Reputation: 1839

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

Upvotes: 0

Related Questions