Does Spring AMQP 3.13 support quorum queues?

18 Views Asked by At

Does Spring AMQP 3.13 support quorum queues?

I'm planning for a RabbitMQ 4 upgrade. How can I start using quorum queues with Spring AMQP 3.13?

Additionally, what features can replace non-durable and exclusive queues in the new setup?

1

There are 1 best solutions below

0
Artem Bilan On

There is nothing special for those queues from Java API. Spring AMQP is fully based on the com.rabbitmq:amqp-client. So, we just have a specific API how to create those queues from Spring application context. See QueueBuilder:

/**
 * Set the queue argument to declare a queue of type 'quorum' instead of 'classic'.
 * @return the builder.
 * @since 2.2.2
 */
public QueueBuilder quorum() {
    return withArgument("x-queue-type", "quorum");
}

There is no replacement for non-durable and exclusive. You still can do like this:

    @Bean
    public Queue quorum() {
        return QueueBuilder.nonDurable("test.quorum")
                .quorum()
                .exclusive()
                .build();
    }