Skip to content

consumoor: drop invalid events instead of halting the partition#861

Merged
samcm merged 1 commit into
masterfrom
fix/consumoor-drop-invalid-events
Jun 25, 2026
Merged

consumoor: drop invalid events instead of halting the partition#861
samcm merged 1 commit into
masterfrom
fix/consumoor-drop-invalid-events

Conversation

@samcm

@samcm samcm commented Jun 25, 2026

Copy link
Copy Markdown
Member

When no DLQ is configured, invalid (permanently unflattenable) events fell into the same fail-the-message path as recoverable decode/write errors, forcing Kafka to redeliver them forever — a single malformed event halted the whole partition on data that can never become storable. This aligns rejectMessage with the route layer's own route.ErrInvalidEvent contract ("permanently unflattenable, should be dropped rather than retried"): invalid events now drop and ack like route rejections, tracked by the MessagesRejected metric, while recoverable decode/write failures still fail-fast for redelivery. Companion to the route-validation work in #860 that surfaces these invalid events.

When no DLQ is configured, invalid (permanently unflattenable) events
hit the same fail-the-message path as recoverable decode/write errors,
forcing Kafka to redeliver them forever — one malformed event halts the
whole partition on data that can never become storable.

The route layer's own contract (route.ErrInvalidEvent) already states
these events are permanently unflattenable and should be dropped rather
than retried. Align rejectMessage with that contract: invalid events
(like already-handled route rejections) drop and ack, tracked by the
MessagesRejected metric. Recoverable failures (decode, write) still
fail-fast for redelivery.
@samcm samcm merged commit 1331000 into master Jun 25, 2026
6 checks passed
@samcm samcm deleted the fix/consumoor-drop-invalid-events branch June 25, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant