Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Produce request#

Sumit Rawal answered on June 1, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


Produce request#

0

Recall from previous chapters that a producer can consider a message successfully written by configuring the acks parameter to 0, 1 or all. When acks is set to zero, the client producer registers success as soon as the message is sent without waiting for the brokers to accept it. When acks is set to 1, the sent message is considered successfully written to Kafka if the partition leader accepts the message. Lastly, when acks is set to all, message delivery is considered successful when all in-sync replicas accept the message. The usual flow of a produce request when received by a partition replica is run through a few checks:

Does the producer have write privilege to the topic?

Does the acks parameter have a valid value of 0, 1 or all?

If acks has been set to all, are there enough in-sync replicas to safely write the message? Brokers can refuse to write a message if the number of in-sync replicas is below a configurable number.

Once the message has been accepted, it’ll get written to the local disk. In Linux, the message actually ends up in the filesystem cache and there’s no certainty when the message will get written to disk. Note that if acks has been set to 0 or 1, the partition leader will respond immediately after writing the message. However, if acks is set to all, then the leader will store the request in a buffer called the purgatory and wait to respond to the producer client until it observes that all in-sync replicas have replicated the message.

Popularity 1/10 Helpfulness 1/10 Language whatever
Source: Grepper
Tags: whatever
Link to this answer
Share Copy Link
Contributed on Jun 01 2023
Sumit Rawal
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.