Apache Kafka Practice

Question: 1 / 400

What does the property auto.commit.interval.ms specify in Kafka?

How often snapshots are taken

How frequently offsets will be committed

The property auto.commit.interval.ms in Kafka is critical for managing consumer offsets. It specifies how frequently the consumer's progress (offset) should be committed to the Kafka broker. When auto-commit is enabled, the consumer will automatically save the last processed offset at the interval defined by this property, allowing for more efficient recovery and processing of messages.

This ensures that if a consumer crashes or is restarted, it can resume processing from the last committed offset rather than starting over from the beginning or losing messages. The default value for this property is typically 5000 milliseconds (5 seconds), meaning offsets will be committed every 5 seconds as long as the consumer is processing messages.

In contrast, other options refer to different functionalities within Kafka. Taking snapshots is unrelated to offset committing, and the timeout duration for sending messages pertains to message delivery rather than offset management. Similarly, the maximum number of messages processed at once is not governed by this property, as that relates to batch processing rather than committing offsets. Thus, the focus of auto.commit.interval.ms on frequency of offset commitment makes option B the correct choice.

Get further explanation with Examzify DeepDiveBeta

The timeout duration for sending messages

How many messages can be processed at once

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy