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

Question: 1 / 400

What happens when unclean.leader.election.enable is set to true?

Only the original leader can be used

Out of sync replicas can be leaders

When the configuration option unclean.leader.election.enable is set to true in Apache Kafka, it allows out-of-sync replicas (OSRs) to be elected as the leader of a partition. This means that if the current leader becomes unavailable and no fully in-sync replicas (ISRs) are available to take over leadership, a broker that holds an out-of-sync replica can be elected as the leader instead.

The implication of this setting is significant in scenarios where maintaining availability is crucial, as it enables continued operation of the Kafka cluster even when there may be inconsistencies in the data across replicas. However, this can lead to potential data loss since the elected leader may not have the latest data, thus it is crucial to weigh the trade-offs between availability and data consistency.

In contrast, if unclean.leader.election.enable were set to false, only fully in-sync replicas could be elected as leaders, which would help preserve data integrity but might lead to service unavailability if all fully in-sync replicas were down.

Get further explanation with Examzify DeepDiveBeta

Data loss is completely avoided

All write operations are queued

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy