Repository navigation
Publish MaxRetries error-queue messages as persistent with the original properties - #92
Closed
AlexMarold wants to merge 1 commit into
Closed
AlexMarold wants to merge 1 commit into
AlexMarold wants to merge 1 commit into
Conversation
…erties A broker restart dropped messages that MaxRetries had moved to the error queue on classic queues, because it published only the payload as a transient message. It also lost the headers, content type, message id and timestamp of the original message. MaxRetries now publishes with delivery mode 2 and copies the properties of the received message. It removes the x-death header, so a message that is moved back to the main queue is processed again, and it does not copy user_id, because RabbitMQ rejects a publish whose user_id differs from the connection user. The timestamp is converted from Time to an integer, because Bunny decodes it as Time but cannot encode it again. The delivery mode is set after the copy, because Bunny only derives it when the options do not contain one. Messages that are already in an error queue stay transient. MaxRetries still acks without publisher confirms. The release is 0.28.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Closing unmerged. Error-queue messages are already persistent on |
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.
Tracking issue: ivx/product#38301
Why
Ears::Middlewares::MaxRetriespublished messages to the error queue as transient messages, so a broker restart dropped them from a classic queue. It also published only the payload, so the headers,content_type,message_idandtimestampof the original message were lost. Messages in an error queue are parked for later inspection or replay, so this loses data.What changes for users
user_id(RabbitMQ rejects a publish whoseuser_iddiffers from the connection user) and thex-deathheader (so a message that you move back to the main queue is processed again).timestampis converted to an integer before it is published. Bunny decodes it asTimebut cannot encode aTimeagain.MaxRetriesstill acks the original message after the publish.MaxRetriesbefore any middleware that changes the body (for exampleJSON). OtherwiseMaxRetriesgets the parsed body, not the original text.Out of scope: publisher confirms for the error-queue publish (follow-up). Messages that are already in an error queue stay transient.
🤖 Generated with Claude Code