Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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/

like image 658
Touseef Zaki Avatar asked Sep 15 '25 13:09

Touseef Zaki


1 Answers

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.

like image 145
Mickael Maison Avatar answered Sep 17 '25 19:09

Mickael Maison