Repository navigation
feat: consume the retry subject instead of parking failures - #16
Merged
Merged
Conversation
The backoff retry middleware republishes a failed message to <subject>-retry, but nothing consumed that subject, so a failure was parked rather than retried and no alert fired. In production that hid broken user creation for seventeen days behind a consumer report that looked entirely healthy. Run a second processor over the retry subject in this same process, so no new deployment is needed. It gets its own driver: ep takes the durable consumer name from driver-level config rather than per-subject, so two Consume calls on one driver would call CreateOrUpdateConsumer with the same durable name and different filter subjects, and the second would reconfigure the first. Exhausted retries now go to <subject>-dlq rather than back onto the retry subject. ep acks and drops a message once the counter reaches MaxRetries, so cycling would make a permanently failing message vanish with no record, which is the same invisibility in a shorter loop. The two consumers run under an errgroup so that one returning stops the other. Consume blocks until its iterator is stopped, so otherwise a dead main consumer would leave the process alive and apparently healthy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
🎉 This PR is included in version 1.17.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
feat: consume the retry subject instead of parking failures
The backoff retry middleware republishes a failed message to -retry,
but nothing consumed that subject, so a failure was parked rather than retried
and no alert fired. In production that hid broken user creation for seventeen
days behind a consumer report that looked entirely healthy.
Run a second processor over the retry subject in this same process, so no new
deployment is needed. It gets its own driver: ep takes the durable consumer name
from driver-level config rather than per-subject, so two Consume calls on one
driver would call CreateOrUpdateConsumer with the same durable name and
different filter subjects, and the second would reconfigure the first.
Exhausted retries now go to -dlq rather than back onto the retry
subject. ep acks and drops a message once the counter reaches MaxRetries, so
cycling would make a permanently failing message vanish with no record, which
is the same invisibility in a shorter loop.
The two consumers run under an errgroup so that one returning stops the other.
Consume blocks until its iterator is stopped, so otherwise a dead main consumer
would leave the process alive and apparently healthy.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com