Retrying A Permanent Error
A consumer retries in place with backoff and no attempt cap. max.poll.interval.ms is at its default of 5 minutes.
for (ConsumerRecord<byte[], byte[]> r : records) {
while (true) {
try { handler.process(r); break; }
catch (Exception e) {
log.warn("retrying", e);
Thread.sleep(backoff.next()); // capped at 30s
}
}
}
A producer ships a record whose payload fails schema validation inside handler.process. Describe the blast radius.
Sign in to answer questions and track your progress
Sign In