Apache Kafka Practice Exam 2026 – The Complete All-in-One Guide for Exam Success!

Get more with Examzify Plus

Remove ads, unlock favorites, save progress, and access premium tools across devices.

FavoritesSave progressAd-free
From $9.99Learn more

1 / 400

What should you do to avoid losing messages when sending critical data?

Increase the buffer size of the producer

Set retries on the producer

Setting retries on the producer is a crucial strategy to avoid losing messages when sending critical data. This configuration allows the producer to automatically attempt to resend messages that have not been acknowledged by the Kafka broker. In scenarios where network issues or broker failures occur, enabling retries helps ensure that the messages are eventually delivered, thus maintaining data integrity.

When retries are configured, the producer will keep trying to send the message for a specified number of attempts or until an acknowledgment is received, depending on the configuration. This increases the resilience of the message delivery process, especially for critical data that must not be lost.

The other strategies do not effectively address the need to ensure message delivery. Increasing the buffer size of the producer does not directly influence whether messages are lost; it primarily affects performance and throughput. Sending messages with acks set to zero means that the producer does not wait for any acknowledgment from the broker, significantly increasing the risk of message loss. Sending messages only during peak hours does not inherently manage the reliability of message delivery and may limit the operational flexibility, especially when critical data needs to be sent.

Get further explanation with Examzify DeepDiveBeta

Send messages with acks = 0

Only send messages during peak hours

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy