Kafka: exceeding max.poll.interval.ms triggers a rebalance mid-batch

The broker treats a consumer that has not called poll() within the interval as dead and reassigns its partitions. Slow processing therefore causes a rebalance, the rebalance causes redelivery, and the redelivery makes processing slower.

Full code & output

This topic is available to PRO members.

Sign in Create a free account

Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.

Published 2026-08-25