Event Consumer Advances Checkpoint Past a Failed Message
Level 3 · node · Reliability · Contiguous processing checkpoint error
Scenario
An analytics pipeline consumer reads batches starting after the stored checkpoint and processes events in offset order. Normal batches work, but operations reports missing data when a handler temporarily fails on an event in the middle of a batch: even after recovery, that event is never processed again. The consumer, event source, handler, and checkpoint repository are separate, and the checkpoint determines where processing resumes after a restart.
Requirements
- When every event succeeds, advance the checkpoint through the final successful offset - When an event in the middle fails, checkpoint only through the contiguous successful offset immediately before it - Even if later events are processed in the same run, the checkpoint must not advance beyond the failed offset - After the failure is cleared, the next run can retry starting from the failed offset - Events at or before an already committed checkpoint are not processed again
Acceptance criteria
- A successful batch checkpoints through the final event offset
- When a middle event fails, the checkpoint remains at the offset immediately before it
- Success of later events does not move the checkpoint across the failed offset
- After recovery, the next run processes the previously failed event again
- A completed contiguous range is not duplicated on the next run