1

I want to optimize my kafka producer (working in python using the confluent-kafka library). I have a topic for which acknowledgment of the leader receiving a message is not important. Therefore, I've set the acks to 0.

I'm wondering something about the above though: Does this really mean that no acknowledgment is sent at all? Thus I do not need to poll() after producing? Or would I risk a filling up an internal Queue if I don't poll after producing?

Thanks in advance!

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Jeroen
  • 25
  • 1
  • 6
  • Before I set the answer, I didn't understand your second question (please share an example).For the first one, ack=0 mean that the producer sent the message to the broker without waiting any response (for example, if that broker crash before replicating, the message will be lost) – ahmed.ettoumi Feb 22 '23 at 00:17
  • Hey @ahmed.ettoumi! So from my understanding, after producing a message, a delivery report is returned which updates the producer on e.g. errors in case of failure to send the message to a partition. These delivery reports can be polled for using the `poll()` function. My question here is: If `acks=0`, does polling for a delivery report still make sense? Considering this configuration basically says: _"I don't require any acknowledgement from the broker if it went okay or not"_. My assumption would be: No, polling is not required in that case. Does this make more sense? – Jeroen Feb 22 '23 at 10:50

0 Answers0