|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | /** |
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` |
5 | 7 | */ |
6 | 8 | return [ |
7 | 9 |
|
|
14 | 16 | 'login' => env('RABBITMQ_LOGIN', 'guest'), |
15 | 17 | 'password' => env('RABBITMQ_PASSWORD', 'guest'), |
16 | 18 |
|
| 19 | + /* |
| 20 | + * The name of default queue. |
| 21 | + */ |
17 | 22 | 'queue' => env('RABBITMQ_QUEUE'), |
18 | | - // name of the default queue, |
19 | 23 |
|
| 24 | + /* |
| 25 | + * Determine if exchange should be created if it does not exist. |
| 26 | + */ |
20 | 27 | '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 | + */ |
22 | 32 | 'queue_declare_bind' => env('RABBITMQ_QUEUE_DECLARE_BIND', true), |
23 | | - // create the queue if not exists and bind to the exchange |
24 | 33 |
|
| 34 | + /* |
| 35 | + * Read more about possible values at https://www.rabbitmq.com/tutorials/amqp-concepts.html |
| 36 | + */ |
25 | 37 | 'queue_params' => [ |
26 | 38 | 'passive' => env('RABBITMQ_QUEUE_PASSIVE', false), |
27 | 39 | 'durable' => env('RABBITMQ_QUEUE_DURABLE', true), |
|
31 | 43 | 'exchange_params' => [ |
32 | 44 | 'name' => env('RABBITMQ_EXCHANGE_NAME', null), |
33 | 45 | 'type' => env('RABBITMQ_EXCHANGE_TYPE', 'direct'), |
34 | | - // more info at http://www.rabbitmq.com/tutorials/amqp-concepts.html |
35 | 46 | 'passive' => env('RABBITMQ_EXCHANGE_PASSIVE', false), |
36 | 47 | 'durable' => env('RABBITMQ_EXCHANGE_DURABLE', true), |
37 | | - // the exchange will survive server restarts |
38 | 48 | 'auto_delete' => env('RABBITMQ_EXCHANGE_AUTODELETE', false), |
39 | 49 | ], |
40 | 50 |
|
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 | + */ |
43 | 55 | 'sleep_on_error' => env('RABBITMQ_ERROR_SLEEP', 5), |
44 | 56 |
|
45 | 57 | ]; |
0 commit comments