Foo-Foo-MQ / foo-foo-mq

Abstractions around RabbitMQ
MIT License
49 stars 24 forks source link

Is there support to set queue type (x-queue-type) when adding a queue (quorum support)? #54

Closed MartianH closed 9 months ago

MartianH commented 9 months ago

Greetings,

As per the documentation (Topology | addQueue) these should be all available arguments. I might have missed something but I do not see how to set x-queue-type.

As you already know classic queues will be removed entirely in v4.0 of RabbitMQ (see here). As such, I assume thios lib should have an argument to set x-queue-type to quorum.

Thanks in advance.

MartianH commented 9 months ago

Found the solution after digging in the code. While this is not documented, you can pass the same arguments object in the config object for a queue as for amqpLib (assertQUeue).

queues: [
    {
        name: RABBITMQ_QUEUE,
        limit: 1000,
        subscribe: true,
       // maxPriority: 100 <-- does not work for quorum queues
        arguments: { 'x-queue-type': 'quorum' }
    },
]

This will be passed straight to amqplib function.