Skip to content

Commit

Permalink
jakubkulhan#136: Adding documentation to connect to quorum queues
Browse files Browse the repository at this point in the history
  • Loading branch information
MTijn committed May 4, 2023
1 parent 1f6c8f2 commit 0279f43
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ $channel = $bunny->channel();
$channel->queueDeclare('queue_name'); // Queue name
```

#### Publishing a message on a virtual host with quorum queues as a default

From RabbitMQ 4 queues will be standard defined as Quorum queues, those are by default durable, in order to connect to them you should use the queue declare method as follows. In the current version of RabbitMQ 3.11.15 this is already supported, if the virtual host is configured to have a default type of Quorum.

```php
$channel = $bunny->channel();
$channel->queueDeclare('queue_name', false, true); // Queue name
```

With a communication channel set up, we can now publish a message to the queue:

```php
Expand Down

0 comments on commit 0279f43

Please sign in to comment.