Sumit Maingi
Sumit Maingi

Reputation: 2263

RabbitMQ - How to find out the Queue mode (default or lazy)

The question is simple, In RabbitMQ, How to find out the Queue mode (default or lazy).

I have tried documentation and experimenting with:

  1. Rabbitmqctl
  2. Rabbitmq management plugin
  3. HTTP API
  4. AMQPLib for nodeJs

I know how to set that using policies, I simply want to know the current mode of a queue when the mode is set upon declaration and not via a policy.

Upvotes: 1

Views: 4736

Answers (2)

Gabriele Santomaggio
Gabriele Santomaggio

Reputation: 22702

you can use the HTTP API to do that: for example, the list of the queues with all the attributes:

curl  -u guest:guest 'localhost:15672/api/queues'

you have to find:

"mode": "lazy"

or

"arguments": {
            "x-queue-mode": "lazy"
        },

Simply in this way:

curl  -u guest:guest \
    'localhost:15672/api/queues' | python -m json.tool | grep '"mode": "lazy"' -A 50 -B 10

or

curl  -u guest:guest \
    'localhost:15672/api/queues' | python -m json.tool | grep '"x-queue-mode"' -A 80 -B 3

or with some language to do that.

Upvotes: 3

Grzesiek Danowski
Grzesiek Danowski

Reputation: 467

Using managament plugin I created new queue with lazy mode: creating new queue

Then I can see that the mode is set up:

show queue properties

Is it wrong?

Upvotes: 0

Related Questions