Skip to content

Commit c6420f1

Browse files
dgafkagitbook-bot
authored andcommitted
GITBOOK-871: No subject
1 parent 1f24a8e commit c6420f1

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

modules/amqp-support-rabbitmq.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,26 @@ Now `orders` channel will be available in our Messaging System. 
8282
### Message Channel Configuration
8383

8484
```php
85-
DbalBackedMessageChannelBuilder::create("orders")
85+
AmqpBackedMessageChannelBuilder::create("orders")
8686
->withAutoDeclare(false) // do not auto declare queue
8787
->withDefaultTimeToLive(1000) // limit TTL of messages
88+
->withDefaultDeliveryDelay(1000) // delay messages by default
89+
```
90+
91+
### Customize Queue Name
92+
93+
By default the queue name will follow channel name, which in above example will be "orders".\
94+
However we can use "orders" as reference name in our Application, yet name queue differently:
95+
96+
```php
97+
#[ServiceContext]
98+
public function orderChannel()
99+
{
100+
return AmqpBackedMessageChannelBuilder::create(
101+
channelName: "orders",
102+
queueName: "crm_orders"
103+
);
104+
}
88105
```
89106

90107
## Distributed Publisher and Consumer

0 commit comments

Comments
 (0)