Fix stale StandardError-only framing, document critical errors - #987
Open
coipond-writer[bot] wants to merge 1 commit into
Open
Fix stale StandardError-only framing, document critical errors#987coipond-writer[bot] wants to merge 1 commit into
coipond-writer[bot] wants to merge 1 commit into
Conversation
As of Karafka 2.6.0, base_consumer.rb:117,141 (on_consume/on_after_consume) rescue Exception, not just StandardError - ScriptError and SystemStackError subclasses now go through the same retry flow this page describes, not just StandardError descendants. Separately, setup/config.rb:326 defines a distinct critical_errors category (default [SystemExit, SignalException, NoMemoryError], configurable via config.internal.processing.critical_errors) that dlq.rb:65-69 confirms is never dispatched to a DLQ regardless of retries, and instead triggers a graceful shutdown via Instrumentation::CriticalErrorsListener. Both facts are already correctly described in Upgrades-Karafka-2.6.md, but were missing from this durable reference page - the page a user on a later version would actually consult. Fixed the opening framing and added a Critical Errors subsection. Fixes #44795.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
`Consumer-Groups/Error-Handling-and-Back-Off-Policy.md`'s opening Runtime section said your code "may raise any exception inherited from `StandardError`," and never mentioned a critical-errors category.
Why it's stale
As of Karafka 2.6.0, `base_consumer.rb:117,141` (`on_consume`/`on_after_consume`) rescue `Exception`, not just `StandardError` -- `ScriptError`/`SystemStackError` subclasses now go through the same retry flow.
Separately, `setup/config.rb:326` defines a distinct `critical_errors` category (default `[SystemExit, SignalException, NoMemoryError]`, configurable via `config.internal.processing.critical_errors`) that `dlq.rb:65-69` confirms is never dispatched to a DLQ regardless of retries, and instead triggers a graceful shutdown via `Instrumentation::CriticalErrorsListener`.
Both facts are already correctly described in `Upgrades-Karafka-2.6.md`, but were missing from this durable reference page -- the page a user on a later version would actually consult.
Fix
Fixed the opening framing and added a "Critical Errors" subsection.
Fixes #44795 (Redmine).