Repository navigation
perf: declare api-queue-production memory-only, matching the aggregator - #737
Merged
Merged
Conversation
Non-durable with no lazy mode, so RabbitMQ 3.10 stops writing every message to disk. Must match the aggregator's declaration, or whichever service declares second is refused with PRECONDITION_FAILED. A spec pins the options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 29, 2026
Maelstromeous
marked this pull request as ready for review
September 29, 2026 12:57
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.
RabbitMQ won't change an existing queue's arguments, so the durable, lazy
api-queue-productionhas to be swapped for a memory-only one once. Run this just before merging this PR and ps2alerts/aggregator#1025:--if-emptyrefuses while messages are waiting and deletes nothing. It normally sits at about 0, so re-run it a moment later./. Add-p <vhost>to both commands (and put the vhost in place of<<"/">>) if production uses another one.PRECONDITION_FAILED - inequivalent arg 'durable', so the new aggregator's API publisher can't connect inside its 5 s boot timeout, and the new api-aggregator can't consume.Rehearsed on a local
bitnamilegacy/rabbitmq:3.10.13holding the production queue arguments.--if-emptyrefused while 5 messages were waiting, the delete and redeclare left 1,000 delay messages untouched, and both new declarations were then accepted. The old api declaration was refused.What this does
This declares
api-queue-productionnon-durable with no lazy mode, so RabbitMQ 3.10 stops writing every message to disk. It pairs with ps2alerts/aggregator#1025, which declares the queue the same way and publishes to it transient. The declarations must match, or whichever service declares second is refused withPRECONDITION_FAILED.rabbitmq.queueOptionsis now{durable: false, messageTtl: 10800000}. The consumer and the healthcheck client both declare with it.main's config and passes with this change.After any RabbitMQ restart, the queue doesn't exist until the aggregator or the api declares it again. Delay messages that expire before then are dropped. That trade-off is accepted, and ps2alerts/aggregator#1025 has the detail.
Validation done
yarn run lintshows 0 errors; its 11 warnings are all in untouched files.yarn testpasses 6 of 6, andyarn run buildpasses.bitnamilegacy/rabbitmq:3.10.13, the built config's declaration was accepted against the redeclared queue.🤖 Generated with Claude Code