Touseef Zaki
Touseef Zaki

Reputation: 89

Is it possible to set the 'acks' (acknowledgement) property other than in Producer configuration

Need help in understanding the 'acks' property in Kafka which is there in the Producer Configuration.

Let's say if I missed passing 'acks' property in the producer class. Then by default Kafka considers it 'acks =0. Now suppose I need to have 'acks=all' so that it will guarantee my message delivery to Kafka broker. Is there any way I can make sure it always has' acks=all' by default all the time may be any setting in server.properties file?

I have read the Kafka documentation https://kafka.apache.org/documentation/

Upvotes: 4

Views: 1076

Answers (1)

Mickael Maison
Mickael Maison

Reputation: 26885

With the Java client, the default value for acks is 1, meaning an aknowledgement is sent back to the producer once the broker has received the message, see http://kafka.apache.org/documentation/#producerconfigs

This configuration has to be set on all producer clients. There's nothing you can do on the brokers to change that.

Upvotes: 3

Related Questions