Search code examples
rabbitmq

Whats the difference of an classic queue with and without x-queue-type: classic in RabbitMQ


When creating a queue in the RabbitMQ UI with de default options, it shows in the features column D for durable, and Args with x-queue-type: classic.

When creating it by code, you can create like this in python: channel.queue_declare('QueueName', durable=True), but it is different from the queue created by the UI, without the Args feature of x-queue-type: classic, but it's type is a classic queue as indicated.

In python, you can create a queue that is just like the one created by default in the UI with this: channel.queue_declare('QueueName', durable=True, arguments={'x-queue-type':'classic'})

My doubt is, since both queue types are classical, whats the difference between the one with the argument x-queue-type: classic and the one without, assuming all rest is the same?

In this image an example as shown in the RabbitMQ UI: image example


Solution

  • In the new RabbitMQ versions, there are different types of queues.

    When you declare a queue using a client, if you don't specify anything the server automatically tag the queues with x-queue-type: classic

    My doubt is, since both queue types are classical, whats the difference between the one with the argument x-queue-type: classic and the one without, assuming all rest is the same?

    It is the same

    ----- EDIT -----

    It is possible to decide the default queue type per virtual host.