Which mechanism is used to detect if a consumer application has died?

Study for the CCDAK Apache Kafka Test. Use flashcards and multiple choice questions with hints and explanations for each question. Prepare thoroughly for your exam!

Multiple Choice

Which mechanism is used to detect if a consumer application has died?

Explanation:
Polling the broker is how a consumer signals its ongoing activity and participates in group coordination. In practice, the consumer runs a loop that calls poll() regularly to fetch new records and to send a heartbeat to the group coordinator. If the broker doesn’t see poll activity (and thus heartbeats) within the configured session timeout, it concludes the consumer has died or become unresponsive and triggers a rebalance to reassign that consumer’s partitions to others. So the poll mechanism directly ties the consumer’s liveness to the broker’s detection logic. It’s worth noting that a heartbeat thread is part of how heartbeats get sent, but the essential detector is the absence of poll activity. The session timeout sets how long the system waits for those heartbeats, and the fetch mechanism is about retrieving messages, not monitoring whether the consumer is alive.

Polling the broker is how a consumer signals its ongoing activity and participates in group coordination. In practice, the consumer runs a loop that calls poll() regularly to fetch new records and to send a heartbeat to the group coordinator. If the broker doesn’t see poll activity (and thus heartbeats) within the configured session timeout, it concludes the consumer has died or become unresponsive and triggers a rebalance to reassign that consumer’s partitions to others. So the poll mechanism directly ties the consumer’s liveness to the broker’s detection logic.

It’s worth noting that a heartbeat thread is part of how heartbeats get sent, but the essential detector is the absence of poll activity. The session timeout sets how long the system waits for those heartbeats, and the fetch mechanism is about retrieving messages, not monitoring whether the consumer is alive.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy