Skip to content

Commit

Permalink
Merge pull request #137 from MTijn/master
Browse files Browse the repository at this point in the history
#136: Adding documentation to connect to quorum queues
  • Loading branch information
WyriHaximus authored May 9, 2023
2 parents 1f6c8f2 + 0279f43 commit 12bc1e2
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 12bc1e2

Please sign in to comment.