Describe the feature.
Is your feature related to a problem? Please describe.
An application running on a primary node where only one instance may consume messages at a time requires a secondary node in a "hot standby state", ready to take over if the primary goes down. RabbitMQ's Single Active Consumer (x-single-active-consumer: true) queue feature enables this pattern, but there is currently no way to configure this queue argument through the NServiceBus RabbitMQ transport or its installers.
Describe the requested feature
Add support for configuring the RabbitMQ x-single-active-consumer: true queue argument via the NServiceBus RabbitMQ transport, so that queues created by endpointConfiguration.EnableInstallers() can have this feature enabled without needing to manually create and manage queues outside of NServiceBus.
Describe alternatives you've considered
- Manually creating the queue with
x-single-active-consumer: true and skipping EnableInstallers(). This works for connectivity but loses the benefits of automated queue management through the NServiceBus installers.
Additional Context
Reported by a user running .NET 9.0 (C#) and NServiceBus 9.2.7. Their setup involves two consumers connected to the same queue; one active and one in standby relying on RabbitMQ's Single Active Consumer feature to ensure only one processes messages at a time, with automatic failover to the standby if the primary goes down.
The attached screenshot shows a RabbitMQ queue configured with x-queue-type: quorum and x-single-active-consumer: true, with 2 consumers where one is in waiting state and the other is single active.
Describe the feature.
Is your feature related to a problem? Please describe.
An application running on a primary node where only one instance may consume messages at a time requires a secondary node in a "hot standby state", ready to take over if the primary goes down. RabbitMQ's Single Active Consumer (
x-single-active-consumer: true) queue feature enables this pattern, but there is currently no way to configure this queue argument through the NServiceBus RabbitMQ transport or its installers.Describe the requested feature
Add support for configuring the RabbitMQ
x-single-active-consumer: truequeue argument via the NServiceBus RabbitMQ transport, so that queues created byendpointConfiguration.EnableInstallers()can have this feature enabled without needing to manually create and manage queues outside of NServiceBus.Describe alternatives you've considered
x-single-active-consumer: trueand skippingEnableInstallers(). This works for connectivity but loses the benefits of automated queue management through the NServiceBus installers.Additional Context
Reported by a user running .NET 9.0 (C#) and NServiceBus 9.2.7. Their setup involves two consumers connected to the same queue; one active and one in standby relying on RabbitMQ's Single Active Consumer feature to ensure only one processes messages at a time, with automatic failover to the standby if the primary goes down.
The attached screenshot shows a RabbitMQ queue configured with
x-queue-type: quorumandx-single-active-consumer: true, with 2 consumers where one is inwaitingstate and the other issingle active.