From 4b8af106b8dab5f901c28396fc57773cb73c2f22 Mon Sep 17 00:00:00 2001 From: Emil Rinaldo Date: Mon, 4 May 2026 14:14:49 +0200 Subject: [PATCH] fix: use exclusive transient queues for RabbitMQ 4.3+ compat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RabbitMQ 4.3.0 deprecated the non-durable + non-exclusive combo (transient_nonexcl_queues) and rejects it by default, so transientEventStreamListener consumers can't connect anymore. exclusive: true is what a transient queue should be anyway — connection-scoped, auto-deleted on disconnect. fan-out still works because each consumer already gets a UUID-named queue via serviceEventRandomQueueName. refs: https://www.rabbitmq.com/docs/queues https://github.com/rabbitmq/rabbitmq-server/discussions/12972 --- lib/index.test.ts | 2 +- lib/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.test.ts b/lib/index.test.ts index 36060b8..76a7ce8 100644 --- a/lib/index.test.ts +++ b/lib/index.test.ts @@ -469,7 +469,7 @@ describe("Connection", () => { { autoDelete: true, durable: false, - exclusive: false, + exclusive: true, expires: 432000000, } ); diff --git a/lib/index.ts b/lib/index.ts index 96e6523..eea96d1 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -222,7 +222,7 @@ class Connection { return this.channel!.assertQueue(queueName, { durable: false, autoDelete: true, - exclusive: false, + exclusive: true, expires: QUEUE_EXPIRATION, }).catch((e) => Promise.reject(new Error(e))); }