Support exchange and queue different config for different rabbitmq servers

Created on 25 June 2020, over 4 years ago
Updated 5 February 2024, 11 months ago

Currently we can configure multiple RabbitMQ servers which is great.

However, sometimes the other server may require different exchange and queue configuration.

For example, currently I'm trying to connect to another RabbitMQ instance where the user has only read-only access and am unable to declare the default server exchanges:

PhpAmqpLib\Exception\AMQPProtocolChannelException: ACCESS_REFUSED - access to exchange 'default_exchange' in vhost '/new-vhost' refused for user

Some options:

1. Group the exchanges and queues under a server key

default:
  exchanges:
    my_exchange:
    type: direct
    passive: false
    durable: true
    auto_delete: false
    internal: false
    nowait: false
  queues:
    my_queue:
    passive: false
    durable: false
    exclusive: false
    auto_delete: false
    nowait: false
    routing_keys:
      - my_exchange.my_queue
other:
  exchanges:
    my_other_exchange:
    type: direct
    passive: false
    durable: true
    auto_delete: false
    internal: false
    nowait: false
  queues:
    my_other_queue:
    passive: false
    durable: false
    exclusive: false
    auto_delete: false
    nowait: false
    routing_keys:
      - my_other_exchange.my_other_queue

2. Add the server key to the exchange and queue definition:

exchanges:
  my_exchange:
  type: direct
  passive: false
  durable: true
  auto_delete: false
  internal: false
  nowait: false
  rabbitmq_servers:
    - default
    - other
queues:
  my_queue:
  passive: false
  durable: false
  exclusive: false
  auto_delete: false
  nowait: false
  routing_keys:
    - my_exchange.my_queue
  rabbitmq_servers:
    - default
    - other

Adding this issue to track the update.

Feature request
Status

Needs work

Version

4.0

Component

Code

Created by

🇳🇿New Zealand davidwhthomas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024