jakubkulhan / bunny

Performant pure-PHP AMQP (RabbitMQ) sync/async (ReactPHP) library
MIT License
698 stars 101 forks source link

Adding documentation to connect to quorum queues #136

Open MTijn opened 1 year ago

MTijn commented 1 year ago

Morning,

Since I am maintaining a cluster of RabbitMQ nodes, I noticed that in RabbitMQ the classic queue is deprecated and quorum is its replacement.

I was browsing some of the examples you have here, and I am seeing that the documentation is not present yet.

As far as I can judge now, the only change to be done to be compatible with quorum queues only, like RabbitMQ 4 is suggesting would be is to have the queueDeclare method to be durable.

$channel->queueDeclare($action, false, true);

This only works when the virtual host is set to be default quorum though, when this is not the case the arguments would be

$channel->queueDeclare($action, false, true,false, false, false, ['x-queue-type' => 'quorum']);

Which I am a bit unsure of, but will solve the immediate issue when RabbitMQ 4 does get released.

WyriHaximus commented 1 year ago

Thanks for filing this, will keep this open for a bit until we have some more documentation on quorum queues.