Rebecca
Rebecca

Reputation: 14412

Altering the max priority on an existing RabbitMQ queue using the management REST API

Using the REST API I'm trying to update the priority of an existing queue like so:

PUT /api/queues/%2F/TestEvent_ProcessingService HTTP/1.1
Host: localhost:15672
Authorization: Basic <--snip-->
cache-control: no-cache   
{
 "durable":true,
 "arguments":{
 "x-max-priority":2
 },
}

The response is:

{
    "error": "bad_request",
    "reason": "inequivalent arg 'x-max-priority' for queue 'TestEvent_ProcessingService' in vhost '/': received the value '2' of type 'long' but current is none"
}

Is there any way to set this value on an existing queue, or do you need to delete the queue and recreate it with a new "x-max-priority" value?

Upvotes: 0

Views: 1668

Answers (1)

Luke Bakken
Luke Bakken

Reputation: 9647

The answer is in RabbitMQ's documentation:

https://www.rabbitmq.com/priority.html

do you need to delete the queue and recreate it with a new "x-max-priority" value?

Yes.

(cross-posted question here).

Upvotes: 1

Related Questions