Skip to content

Commit f862811

Browse files
committed
improve configuration documentation
1 parent 6902c11 commit f862811

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

config/rabbitmq.php

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
22

33
/**
4-
* default configuration for laravel-queue-rabbitmq merged with project config to base key 'queue'.
4+
* This is an example of queue connection configuration.
5+
* It will be merged into config/queue.php.
6+
* You need to set proper values in `.env`
57
*/
68
return [
79

@@ -14,14 +16,24 @@
1416
'login' => env('RABBITMQ_LOGIN', 'guest'),
1517
'password' => env('RABBITMQ_PASSWORD', 'guest'),
1618

19+
/*
20+
* The name of default queue.
21+
*/
1722
'queue' => env('RABBITMQ_QUEUE'),
18-
// name of the default queue,
1923

24+
/*
25+
* Determine if exchange should be created if it does not exist.
26+
*/
2027
'exchange_declare' => env('RABBITMQ_EXCHANGE_DECLARE', true),
21-
// create the exchange if not exists
28+
29+
/*
30+
* Determine if queue should be created and binded to the exchange if it does not exist.
31+
*/
2232
'queue_declare_bind' => env('RABBITMQ_QUEUE_DECLARE_BIND', true),
23-
// create the queue if not exists and bind to the exchange
2433

34+
/*
35+
* Read more about possible values at https://www.rabbitmq.com/tutorials/amqp-concepts.html
36+
*/
2537
'queue_params' => [
2638
'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
2739
'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
@@ -31,15 +43,15 @@
3143
'exchange_params' => [
3244
'name' => env('RABBITMQ_EXCHANGE_NAME', null),
3345
'type' => env('RABBITMQ_EXCHANGE_TYPE', 'direct'),
34-
// more info at http://www.rabbitmq.com/tutorials/amqp-concepts.html
3546
'passive' => env('RABBITMQ_EXCHANGE_PASSIVE', false),
3647
'durable' => env('RABBITMQ_EXCHANGE_DURABLE', true),
37-
// the exchange will survive server restarts
3848
'auto_delete' => env('RABBITMQ_EXCHANGE_AUTODELETE', false),
3949
],
4050

41-
// the number of seconds to sleep if there's an error communicating with rabbitmq
42-
// if set to false, it'll throw an exception rather than doing the sleep for X seconds
51+
/*
52+
* Determine the number of seconds to sleep if there's an error communicating with rabbitmq
53+
* If set to false, it'll throw an exception rather than doing the sleep for X seconds.
54+
*/
4355
'sleep_on_error' => env('RABBITMQ_ERROR_SLEEP', 5),
4456

4557
];

0 commit comments

Comments
 (0)