Skip to content

Per-queue RabbitMQ DLX overrides ignored when transport DLX is customized #1864

@frankvdb7

Description

@frankvdb7

Describe the bug
Per-queue RabbitMQ dead-letter exchange overrides are ignored. When a transport level DLX is customized and a specific queue sets its own DLX, the queue is still created with the transport default x-dead-letter-exchange.

To Reproduce

  1. Configure RabbitMQ with a transport-level DLX:
     opts.UseRabbitMq().CustomizeDeadLetterQueueing(new DeadLetterQueue("default-dlq")
     {
         ExchangeName = "default-dlx-exchange"
     });
  1. Configure a queue with its own DLX override:
     opts.ListenToRabbitQueue("queue-alpha")
         .DeadLetterQueueing(new DeadLetterQueue("queue-alpha-dlq")
         {
             ExchangeName = "queue-alpha-dlx-exchange"
         });
  1. Start the app and inspect the declared queue arguments in RabbitMQ.
  2. Observe that queue-alpha has x-dead-letter-exchange = default-dlx-exchange instead of queue-alpha-dlx-exchange.

Expected behavior
Each queue should honor its own DLX override, so queue-alpha should be declared with x-dead-letter-exchange = queue- alpha-dlx-exchange.

Screenshots
N/A

Additional context
Occurs when both a transport-level DLX and a per-queue DLX are configured; the shared DLQ instance causes the queue to pick up the transport default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions