Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow configuring optional queue arguments #3239

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
### Unreleased

- dep(plugin-spf): bump version to 1.2.1
- feat(rabbitmq_amqplib): configurable optional queue arguments

### [3.0.2] - 2023-06-12

Expand Down
9 changes: 8 additions & 1 deletion config/rabbitmq_amqplib.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ queueName = emails
deliveryMode = 2
confirm = true
durable = true
autoDelete = false
autoDelete = false

; Optional queue arguments
; [queue_args]
; x-dead-letter-exchange =
; x-dead-letter-routing-key = emails_dlq
; x-overflow = reject-publish
; x-queue-type = quorum
7 changes: 7 additions & 0 deletions docs/plugins/queue/rabbitmq_amqplib.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@ Configuration
durable = true
autoDelete = false

; Optional queue arguments
; More information about x-arguments can be found at https://www.rabbitmq.com/queues.html#optional-arguments
[queue_args]
x-dead-letter-exchange =
x-dead-letter-routing-key = emails_dlq
x-overflow = reject-publish
x-queue-type = quorum

More information about RabbitMQ can be found at https://www.rabbitmq.com/
2 changes: 1 addition & 1 deletion plugins/queue/rabbitmq_amqplib.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports.init_amqp_connection = function () {
return conn.close();
}
ch.assertQueue(queueName,
{durable, autoDelete},
{durable, autoDelete, arguments: this.config.get("rabbitmq.ini").queue_args},
msimerson marked this conversation as resolved.
Show resolved Hide resolved
(err4, ok2) => {
if (err4) {
this.logerror(`Error asserting rabbitmq queue: ${err4}`);
Expand Down