Skip to content

Declaring a classic priority queue leads to strange "queue storage version" #9370

@walro

Description

@walro

Describe the bug

Declaring a priority queue leads to weird values being presented in the management UI (and via rabbitmqadmin), see screenshots.

Here I would expect it to be 1 rather than 11:

Screenshot 2023-09-12 at 12 47 02

and here to be 2 rather than 22:

Screenshot 2023-09-12 at 12 48 27

Reproduction steps

  1. Create two queues:
    1. rabbitmqadmin declare queue name=priority-bug1 arguments='{"x-max-priority":10,"x-queue-version":1}'
    2. rabbitmqadmin declare queue name=priority-bug2 arguments='{"x-max-priority":10,"x-queue-version":2}'
  2. List the queues:
    1. rabbitmqadmin --vhost / list queues name backing_queue_status.version
  3. See the output not having the expected values:
+---------------+------------------------------+ | name | backing_queue_status.version | +---------------+------------------------------+ | priority-bug1 | 11 | | priority-bug2 | 22 | +---------------+------------------------------+ 

It seems like the value becomes something like (1 + max_priority) * queue_version?

Expected behavior

To see versions correspond to the queue version number.

Additional context

Tried this on 3.12.4, but have observed on 3.12.1 too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions