Skip to content

Commit 11b444c

Browse files
committed
small fixes
1 parent 5fc2d81 commit 11b444c

File tree

2 files changed

+137
-133
lines changed

2 files changed

+137
-133
lines changed

src/config/rabbitmq.php

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,32 @@
66
*/
77
return [
88

9-
'driver' => 'rabbitmq',
9+
'driver' => 'rabbitmq',
1010

11-
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
12-
'port' => env('RABBITMQ_PORT', 5672),
11+
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
12+
'port' => env('RABBITMQ_PORT', 5672),
1313

14-
'vhost' => env('RABBITMQ_VHOST', '/'),
15-
'login' => env('RABBITMQ_LOGIN', 'guest'),
16-
'password' => env('RABBITMQ_PASSWORD', 'guest'),
14+
'vhost' => env('RABBITMQ_VHOST', '/'),
15+
'login' => env('RABBITMQ_LOGIN', 'guest'),
16+
'password' => env('RABBITMQ_PASSWORD', 'guest'),
1717

18-
'queue' => env('RABBITMQ_QUEUE'), // name of the default queue,
18+
'queue' => env('RABBITMQ_QUEUE'), // name of the default queue,
1919

20-
'exchange_declare' => env('RABBITMQ_EXCHANGE_DECLARE', true), // create the exchange if not exists
21-
'queue_declare_bind' => env('RABBITMQ_QUEUE_DECLARE_BIND', true), // create the queue if not exists and bind to the exchange
20+
'exchange_declare' => env('RABBITMQ_EXCHANGE_DECLARE', true), // create the exchange if not exists
21+
'queue_declare_bind' => env('RABBITMQ_QUEUE_DECLARE_BIND', true), // create the queue if not exists and bind to the exchange
2222

23-
'queue_params' => [
24-
'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
25-
'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
26-
'exclusive' => env('RABBITMQ_QUEUE_EXCLUSIVE', false),
27-
'auto_delete' => env('RABBITMQ_QUEUE_AUTODELETE', false),
23+
'queue_params' => [
24+
'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
25+
'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
26+
'exclusive' => env('RABBITMQ_QUEUE_EXCLUSIVE', false),
27+
'auto_delete' => env('RABBITMQ_QUEUE_AUTODELETE', false),
2828
],
29-
'exchange_params' => [
30-
'type' => env('RABBITMQ_EXCHANGE_TYPE', 'direct'), // more info at http://www.rabbitmq.com/tutorials/amqp-concepts.html
31-
'passive' => env('RABBITMQ_EXCHANGE_PASSIVE', false),
32-
'durable' => env('RABBITMQ_EXCHANGE_DURABLE', true), // the exchange will survive server restarts
33-
'auto_delete' => env('RABBITMQ_EXCHANGE_AUTODELETE', false),
29+
'exchange_params' => [
30+
'name' => env('RABBITMQ_EXCHANGE_NAME', null),
31+
'type' => env('RABBITMQ_EXCHANGE_TYPE', 'direct'), // more info at http://www.rabbitmq.com/tutorials/amqp-concepts.html
32+
'passive' => env('RABBITMQ_EXCHANGE_PASSIVE', false),
33+
'durable' => env('RABBITMQ_EXCHANGE_DURABLE', true), // the exchange will survive server restarts
34+
'auto_delete' => env('RABBITMQ_EXCHANGE_AUTODELETE', false),
3435
],
3536

3637
];

src/examples/queue.php

Lines changed: 117 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -2,119 +2,122 @@
22

33
return [
44

5-
/*
6-
|--------------------------------------------------------------------------
7-
| Default Queue Driver
8-
|--------------------------------------------------------------------------
9-
|
10-
| The Laravel queue API supports a variety of back-ends via an unified
11-
| API, giving you convenient access to each back-end using the same
12-
| syntax for each one. Here you may set the default queue driver.
13-
|
14-
| Supported: "null", "sync", "database", "beanstalkd",
15-
| "sqs", "iron", "redis"
16-
|
17-
*/
18-
19-
'default' => env('QUEUE_DRIVER', 'sync'),
20-
21-
/*
22-
|--------------------------------------------------------------------------
23-
| Queue Connections
24-
|--------------------------------------------------------------------------
25-
|
26-
| Here you may configure the connection information for each server that
27-
| is used by your application. A default configuration has been added
28-
| for each back-end shipped with Laravel. You are free to add more.
29-
|
30-
*/
31-
32-
'connections' => [
33-
34-
'sync' => [
35-
'driver' => 'sync',
36-
],
37-
38-
'database' => [
39-
'driver' => 'database',
40-
'table' => 'jobs',
41-
'queue' => 'default',
42-
'expire' => 60,
43-
],
44-
45-
'beanstalkd' => [
46-
'driver' => 'beanstalkd',
47-
'host' => 'localhost',
48-
'queue' => 'default',
49-
'ttr' => 60,
50-
],
51-
52-
'sqs' => [
53-
'driver' => 'sqs',
54-
'key' => 'your-public-key',
55-
'secret' => 'your-secret-key',
56-
'queue' => 'your-queue-url',
57-
'region' => 'us-east-1',
58-
],
59-
60-
'iron' => [
61-
'driver' => 'iron',
62-
'host' => 'mq-aws-us-east-1.iron.io',
63-
'token' => 'your-token',
64-
'project' => 'your-project-id',
65-
'queue' => 'your-queue-name',
66-
'encrypt' => true,
67-
],
68-
69-
'redis' => [
70-
'driver' => 'redis',
71-
'queue' => 'default',
72-
'expire' => 60,
73-
],
74-
75-
'rabbitmq' => [
76-
'driver' => 'rabbitmq',
77-
78-
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
79-
'port' => env('RABBITMQ_PORT', 5672),
80-
81-
'vhost' => env('RABBITMQ_VHOST', '/'),
82-
'login' => env('RABBITMQ_LOGIN', 'guest'),
83-
'password' => env('RABBITMQ_PASSWORD', 'guest'),
84-
85-
'queue' => env('RABBITMQ_QUEUE'), // name of the default queue,
86-
87-
'queue_params' => [
88-
'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
89-
'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
90-
'exclusive' => env('RABBITMQ_QUEUE_EXCLUSIVE', false),
91-
'auto_delete' => env('RABBITMQ_QUEUE_AUTODELETE', false),
92-
],
93-
94-
'exchange_params' => [
95-
'type' => env('RABBITMQ_EXCHANGE_TYPE', 'direct'), // more info at http://www.rabbitmq.com/tutorials/amqp-concepts.html
96-
'passive' => env('RABBITMQ_EXCHANGE_PASSIVE', false),
97-
'durable' => env('RABBITMQ_EXCHANGE_DURABLE', true), // the exchange will survive server restarts
98-
'auto_delete' => env('RABBITMQ_EXCHANGE_AUTODELETE', false),
99-
],
100-
101-
],
102-
103-
],
104-
105-
/*
106-
|--------------------------------------------------------------------------
107-
| Failed Queue Jobs
108-
|--------------------------------------------------------------------------
109-
|
110-
| These options configure the behavior of failed queue job logging so you
111-
| can control which database and table are used to store the jobs that
112-
| have failed. You may change them to any database / table you wish.
113-
|
114-
*/
115-
116-
'failed' => [
117-
'database' => 'mysql', 'table' => 'failed_jobs',
118-
],
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Default Queue Driver
8+
|--------------------------------------------------------------------------
9+
|
10+
| The Laravel queue API supports a variety of back-ends via an unified
11+
| API, giving you convenient access to each back-end using the same
12+
| syntax for each one. Here you may set the default queue driver.
13+
|
14+
| Supported: "null", "sync", "database", "beanstalkd",
15+
| "sqs", "iron", "redis"
16+
|
17+
*/
18+
19+
'default' => env('QUEUE_DRIVER', 'sync'),
20+
21+
/*
22+
|--------------------------------------------------------------------------
23+
| Queue Connections
24+
|--------------------------------------------------------------------------
25+
|
26+
| Here you may configure the connection information for each server that
27+
| is used by your application. A default configuration has been added
28+
| for each back-end shipped with Laravel. You are free to add more.
29+
|
30+
*/
31+
32+
'connections' => [
33+
34+
'sync' => [
35+
'driver' => 'sync',
36+
],
37+
38+
'database' => [
39+
'driver' => 'database',
40+
'table' => 'jobs',
41+
'queue' => 'default',
42+
'expire' => 60,
43+
],
44+
45+
'beanstalkd' => [
46+
'driver' => 'beanstalkd',
47+
'host' => 'localhost',
48+
'queue' => 'default',
49+
'ttr' => 60,
50+
],
51+
52+
'sqs' => [
53+
'driver' => 'sqs',
54+
'key' => 'your-public-key',
55+
'secret' => 'your-secret-key',
56+
'queue' => 'your-queue-url',
57+
'region' => 'us-east-1',
58+
],
59+
60+
'iron' => [
61+
'driver' => 'iron',
62+
'host' => 'mq-aws-us-east-1.iron.io',
63+
'token' => 'your-token',
64+
'project' => 'your-project-id',
65+
'queue' => 'your-queue-name',
66+
'encrypt' => true,
67+
],
68+
69+
'redis' => [
70+
'driver' => 'redis',
71+
'queue' => 'default',
72+
'expire' => 60,
73+
],
74+
75+
'rabbitmq' => [
76+
'driver' => 'rabbitmq',
77+
78+
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
79+
'port' => env('RABBITMQ_PORT', 5672),
80+
81+
'vhost' => env('RABBITMQ_VHOST', '/'),
82+
'login' => env('RABBITMQ_LOGIN', 'guest'),
83+
'password' => env('RABBITMQ_PASSWORD', 'guest'),
84+
85+
'queue' => env('RABBITMQ_QUEUE'), // name of the default queue,
86+
'exchange_declare' => env('RABBITMQ_EXCHANGE_DECLARE', true), // create the exchange if not exists
87+
'queue_declare_bind' => env('RABBITMQ_QUEUE_DECLARE_BIND', true), // create the queue if not exists and bind to the exchange
88+
89+
'queue_params' => [
90+
'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
91+
'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
92+
'exclusive' => env('RABBITMQ_QUEUE_EXCLUSIVE', false),
93+
'auto_delete' => env('RABBITMQ_QUEUE_AUTODELETE', false),
94+
],
95+
96+
'exchange_params' => [
97+
'name' => env('RABBITMQ_EXCHANGE_NAME', null),
98+
'type' => env('RABBITMQ_EXCHANGE_TYPE', 'direct'), // more info at http://www.rabbitmq.com/tutorials/amqp-concepts.html
99+
'passive' => env('RABBITMQ_EXCHANGE_PASSIVE', false),
100+
'durable' => env('RABBITMQ_EXCHANGE_DURABLE', true), // the exchange will survive server restarts
101+
'auto_delete' => env('RABBITMQ_EXCHANGE_AUTODELETE', false),
102+
],
103+
104+
],
105+
106+
],
107+
108+
/*
109+
|--------------------------------------------------------------------------
110+
| Failed Queue Jobs
111+
|--------------------------------------------------------------------------
112+
|
113+
| These options configure the behavior of failed queue job logging so you
114+
| can control which database and table are used to store the jobs that
115+
| have failed. You may change them to any database / table you wish.
116+
|
117+
*/
118+
119+
'failed' => [
120+
'database' => 'mysql', 'table' => 'failed_jobs',
121+
],
119122

120123
];

0 commit comments

Comments
 (0)