having multiple quorum queues and regular(classic) queues the same time

179 views Asked by At

In RabbitMQ clustering, can we have multiple queues with quorum type and multiple other queues with regular(classic) type at the same time? if yes, then with Masstransit, how can I register some of them with quorum and others of them with regular(classic) type?

I wrote the below code. but this code applies to all queues:

public class ConfigureQuorumReceiveEndpoint: IConfigureReceiveEndpoint
{
    private const string QueueType = "x-queue-type";
    private const string QuorumQueue = "quorum";
    public void Configure(string name, IReceiveEndpointConfigurator configurator)
    {
        if (configurator is IRabbitMqReceiveEndpointConfigurator rabbitMqConfigurator)
        {
            rabbitMqConfigurator.SetQueueArgument(QueueType, QuorumQueue);
        }
    }
}

How can I apply it to some specific queues?

1

There are 1 answers

2
Chris Patterson On

The name parameter is the receive endpoint name (queue) - you can use that to determine if you want that queue to be Quorum or not.