NewWork mode: your Claude Code or Codex on work calls, answering from your project's codeSkip to content
Middle84 views

Если pod падает посередине обработки Kafka-сообщения, автокоммит отключён, что произойдёт с очередью, оставшимися pod и сообщением?

Practice

AI answer

If the offset hasn’t been committed, Kafka considers the message unprocessed. After the consumer stops sending heartbeats and the timeout expires, the group performs a rebalance: the partitions assigned to the failed pod are reassigned to the remaining consumers. They continue reading from the last committed offset, so the message where the failure occurred will be read again. The other messages in the partition remain in Kafka and will be processed later; the queue itself is not deleted. Duplicates are possible if the handler performed external side effects before the failure. That’s why processing is usually made idempotent, and the offset is committed only after successful processing. Recovery time depends on the group settings and Kafka retention.