Apache Kafka Complete Practice Exam 2025 – All-in-One Prep

Disable ads (and more) with a membership for a one time $4.99 payment

Question: 1 / 185

What can a producer do if it encounters a retriable error?

Stop sending messages

Queue messages for later

Retry sending the message

When a producer encounters a retriable error while sending messages to a Kafka broker, the most appropriate action to take is to retry sending the message. Retriable errors typically indicate that the issue may be temporary, such as a network issue, a broker being temporarily unavailable, or a timeout occurring. Kafka producers are designed to handle such situations by retrying to send the message automatically after a brief pause.

Retrying is an effective strategy because it allows the producer to maintain the flow of data without manual intervention, as long as the error is genuinely retriable and will eventually resolve. This feature enhances the resilience of the messaging system, allowing for smoother operations and ensuring that messages are eventually transmitted once the transient issue is resolved.

While stopping the message transmission or queuing messages might seem like reasonable actions, they do not leverage the inherent capabilities of the Kafka producer. Automatically adjusting acknowledgments (acks) is also not a standard recovery method for retriable errors and can affect message reliability and delivery guarantees. Thus, retrying is the most suitable option in ensuring successful message delivery in the face of temporary issues.

Automatically adjust acks

Next

Report this question