Repository navigation
add the ability to create internal queues as quorum type instead of hard-coded classic - #80
Conversation
…ard-coded classic
iliasbibas
left a comment
There was a problem hiding this comment.
I think we need to look a bit deeper on how quorum queues handle dead lettering, a policy might be needed if we need the messages to end up in a DLQ instead of silently dropped.
@iliasbibas Are you referring to enable the |
Yes, for the delay queues I believe |
|
Btw @Michalis-Apostolou , the |
| name = this.updateName(name, prefix); | ||
| await this.connected; | ||
| await publishWithDelay(this.updateName('delay'), obj, properties, this.consumeChannel, name); | ||
| const queueName = this.scheduledPublishQueuesAsQuorum ? 'delay_quorum' : 'delay'; |
There was a problem hiding this comment.
💭 hold the naming order of quorum until SREs verify what regexps are using for alerts on delay queues (cc @a-margaritis )
There was a problem hiding this comment.
Checked Datadog: no monitor names delay queues. The only ones that cover them are SRE's per-queue length catch-all (6080758) and the unacked-rate anomaly monitor (112880512), and both pick up <app>_delay_quorum_* automatically. @a-margaritis, can you confirm there's nothing on the CloudAMQP side (alarms or policies) that matches _delay_ by name? If not, I think the naming hold can be lifted.
it was intentional , because if there was already existing a classic queue with the same name. and you opt-in to create the same queue with different config (i.e. quorum queue type) it will conflict ungracefully and will cause to disconnect. Then there is the issue on how to resolve such conflict. you can't update a queue config. you have to destroy and recreate the queue. During the recreation of the queue in a high traffic topic may lead to message loss |
I understand that, I'm saying that in a cluster that already has a quorum queue |
set overflow and x-dead-letter-strategy to at-least-once for delayed quorum queues and delayed reply queue
…quorum Keeps both options next to each other: scheduledPublishQueuesAsQuorum from this PR and tolerateQueueTypeMismatch from #81. 5.10.0 shipped without this PR, so its changelog entry moves to 5.11.x. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@iliasbibas revisited the naming now that #81 is merged. #81 only tolerates a queue type or priority mismatch, and only when you opt in. Quorum delay queues also declare Your duplicate case only applies where On policies: none of the policies on the sourcing brokers target delay queues by name. The |
…amqplib typings The compiled js/channel.d.ts referenced ../ts/amqplib.d.ts, which is excluded from the npm package, breaking type checking for consumers without skipLibCheck (TS6053). Passing x-overflow in the queue arguments needs no typings patch.
The previous test published to 'delay', reusing the delay_10000 queue cached by an earlier test, so it never declared a quorum queue or checked its name.
Need
We need to upgrade the rmq cluster to version 4+. in this version High Availability (HA) policy with mirror queues has been deprecated and completely removed https://www.rabbitmq.com/docs/3.13/ha . So we need to replace all
classicqueue definitions withquorumProblem
Rabbit-queue creates internal queues to implement scheduled publishing for a message
{prefix}_delay_reply{prefix}_delay_{XXX}Example:

Since the library does not define the type of the queue , the are created to what is default on the virtual host.
If can't/don't want to change the default queue type of the virtual host , you should have the ability to define if these queues should be created as quorum or not.
Solution
By utilizing a new option available in the package
scheduledPublishQueuesAsQuorumon rabbit config, this will passed around during the creating of the queues.In order to avoid conflicts between already created
classicqueues and newly createdquorumqueues , the naming convention changes to{prefix}_delay_quorum_reply{prefix}_delay_quorum_{XXX}