Skip to content

Ensure queues are bound with durable: true option#3604

Merged
koetsier merged 1 commit intomainfrom
fix_queues
May 1, 2026
Merged

Ensure queues are bound with durable: true option#3604
koetsier merged 1 commit intomainfrom
fix_queues

Conversation

@koetsier
Copy link
Copy Markdown
Contributor

@koetsier koetsier commented Apr 28, 2026

Modern versions of RabbitMQ do not allow queues that are not durable and not exclusive. This change ensures that the queues we define are now all durable to fix this issue.

We also ensure we only create each queue once and then bind two exchanges

This fixes an error when make-ing the search-api in govuk-docker

Modern versions of RabbitMQ do not allow queues that are not durable
and not exclusive. This change ensures that the queues we define are
now all durable to fix this issue.

We also ensure we only create each queue once and then bind two exchanges
Copy link
Copy Markdown
Contributor

@stringiest stringiest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks!

Adding a link to the RabbitMQ docs re durability for future reference.


# messages on the {queue}_discarded_dlx are routed back to the original queue
channel.queue(name).bind(discarded_dlx)
channel.queue(name, durable: true, arguments: { "x-dead-letter-exchange" => retry_dlx.name }).tap do |q|
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh I haven't come across tap before! It's very pleasing!

@koetsier koetsier merged commit b211499 into main May 1, 2026
7 checks passed
@koetsier koetsier deleted the fix_queues branch May 1, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants