-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathqueue.php
More file actions
233 lines (221 loc) · 9.56 KB
/
queue.php
File metadata and controls
233 lines (221 loc) · 9.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<?php
$rabbit_port = intval( env('RABBITMQ_PORT', 5671) );
$rabbit_connection = PhpAmqpLib\Connection\AMQPLazyConnection::class;
if($rabbit_port === 5671)
$rabbit_connection = PhpAmqpLib\Connection\AMQPSSLConnection::class;
return [
/*
|--------------------------------------------------------------------------
| Default Queue Driver
|--------------------------------------------------------------------------
|
| The Laravel queue API supports a variety of back-ends via an unified
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "null", "sync", "database", "beanstalkd",
| "sqs", "redis"
|
*/
'default' => env('QUEUE_DRIVER', 'database'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
*/
'connections' => [
'database' => [
'connection' => env('QUEUE_CONN', ''),
'database' => env('QUEUE_DATABASE', ''),
'driver' => 'database',
'table' => 'queue_jobs',
'queue' => 'default',
'expire' => 60,
],
'redis' => [
'driver' => 'redis',
'connection' => 'worker',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => (int) env('REDIS_RETRY_AFTER', 1800),
'block_for' => null,
'after_commit' => false,
],
/* SOURCE API IDP
* DOMAIN EVENTS:
* - PublishUserCreated ( app/Jobs/PublishUserCreated.php )
* - PublishUserDeleted ( app/Jobs/PublishUserDeleted.php )
* - PublishUserUpdated ( app/Jobs/PublishUserUpdated.php )
*/
'message_broker' => [
'driver' => 'rabbitmq',
'queue' => env('RABBITMQ_QUEUE', ''),
'connection' => $rabbit_connection,
'hosts' => [
[
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
'port' => $rabbit_port,
'user' => env('RABBITMQ_LOGIN', 'guest'),
'password' => env('RABBITMQ_PASSWORD', 'guest'),
'vhost' => env('RABBITMQ_VHOST', '/'),
],
],
'options' => [
'ssl_options' => [
// @see https://www.php.net/manual/en/context.ssl.php
'cafile' => env('RABBITMQ_SSL_CAFILE', null),
'local_cert' => env('RABBITMQ_SSL_LOCALCERT', null),
'local_pk' => env('RABBITMQ_SSL_LOCALKEY', null),
'verify_peer' => env('RABBITMQ_SSL_VERIFY_PEER', true),
'passphrase' => env('RABBITMQ_SSL_PASSPHRASE', null),
],
'queue' => [
'exchange' => env('RABBITMQ_EXCHANGE_NAME'),
'exchange_type' => env('RABBITMQ_EXCHANGE_TYPE', 'fanout'),
'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
'exclusive' => env('RABBITMQ_QUEUE_EXCLUSIVE', false),
'auto_delete' => env('RABBITMQ_QUEUE_AUTODELETE', true),
],
],
],
/* SOURCE API sponsor users api
* DOMAIN EVENTS:
* - auth_user_added_to_group
* - auth_user_removed_from_group
* - auth_user_added_to_sponsor_and_summit
* - auth_user_removed_from_sponsor_and_summit
* - auth_user_removed_from_summit
*/
'sponsor_users_sync_consumer' => [
'driver' => 'rabbitmq',
'queue' => env('SPONSOR_USERS_QUEUE', 'sponsor-users-api-summit-api-badge-scans-queue'),
'connection' => $rabbit_connection,
'hosts' => [
[
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
'port' => $rabbit_port,
'user' => env('RABBITMQ_LOGIN', 'guest'),
'password' => env('RABBITMQ_PASSWORD', 'guest'),
'vhost' => env('RABBITMQ_VHOST', '/'),
],
],
'options' => [
'ssl_options' => [
// @see https://www.php.net/manual/en/context.ssl.php
'cafile' => env('RABBITMQ_SSL_CAFILE', null),
'local_cert' => env('RABBITMQ_SSL_LOCALCERT', null),
'local_pk' => env('RABBITMQ_SSL_LOCALKEY', null),
'verify_peer' => env('RABBITMQ_SSL_VERIFY_PEER', true),
'passphrase' => env('RABBITMQ_SSL_PASSPHRASE', null),
],
'queue' => [
'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
'exclusive' => env('RABBITMQ_QUEUE_EXCLUSIVE', false),
'job' => \App\Jobs\SponsorServices\SponsorServicesMQJob::class,
],
],
],
/* SOURCE API purchases api
* DOMAIN EVENTS:
* - payment_profile_created
* - payment_profile_updated
* - payment_profile_deleted
*/
'payments_sync_consumer' => [
'driver' => 'rabbitmq',
'queue' => env('PAYMENTS_QUEUE', 'purchases-api-summit-api-payment-profiles-queue'),
'connection' => $rabbit_connection,
'hosts' => [
[
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
'port' => $rabbit_port,
'user' => env('RABBITMQ_LOGIN', 'guest'),
'password' => env('RABBITMQ_PASSWORD', 'guest'),
'vhost' => env('RABBITMQ_VHOST', '/'),
],
],
'options' => [
'ssl_options' => [
// @see https://www.php.net/manual/en/context.ssl.php
'cafile' => env('RABBITMQ_SSL_CAFILE', null),
'local_cert' => env('RABBITMQ_SSL_LOCALCERT', null),
'local_pk' => env('RABBITMQ_SSL_LOCALKEY', null),
'verify_peer' => env('RABBITMQ_SSL_VERIFY_PEER', true),
'passphrase' => env('RABBITMQ_SSL_PASSPHRASE', null),
],
'queue' => [
'passive' => env('RABBITMQ_QUEUE_PASSIVE', false),
'durable' => env('RABBITMQ_QUEUE_DURABLE', true),
'exclusive' => env('RABBITMQ_QUEUE_EXCLUSIVE', false),
'job' => \App\Jobs\Payments\PaymentsMQJob::class,
],
],
],
/*
* SOURCE API Summit API
* Summit Entities Domain Events
* DOMAIN EVENTS:
* - sponsor_created ( see app/Events/SponsorServices/SponsorDomainEvents.php )
* - sponsor_updated
* - sponsor_deleted
* - sponsorship_created
* - sponsorship_updated
* - sponsorship_removed
* - sponsorship_addon_created
* - sponsorship_addon_updated
* - sponsorship_addon_removed
* - summit_created ( see app/Events/SponsorServices/SummitDomainEvents.php )
* - summit_updated
* - summit_deleted
*/
'domain_events_message_broker' => [
'driver' => 'rabbitmq',
'hosts' => [
[
'host' => env('DOMAIN_EVENTS_RABBITMQ_HOST', '127.0.0.1'),
'port' => $rabbit_port,
'user' => env('DOMAIN_EVENTS_RABBITMQ_LOGIN', 'guest'),
'password' => env('DOMAIN_EVENTS_RABBITMQ_PASSWORD', 'guest'),
'vhost' => env('DOMAIN_EVENTS_RABBITMQ_VHOST', '/'),
],
],
'options' => [
'exchange' => [
'name' => env('DOMAIN_EVENTS_EXCHANGE_NAME', 'summit-api-message-broker'),
'type' => env('DOMAIN_EVENTS_EXCHANGE_TYPE', 'direct'), // direct, fanout, topic, headers
'passive' => false,
'durable' => true,
'auto_delete' => false,
],
'ssl_options' => [
// @see https://www.php.net/manual/en/context.ssl.php
'cafile' => env('RABBITMQ_SSL_CAFILE', null),
'local_cert' => env('RABBITMQ_SSL_LOCALCERT', null),
'local_pk' => env('RABBITMQ_SSL_LOCALKEY', null),
'verify_peer' => env('RABBITMQ_SSL_VERIFY_PEER', true),
'passphrase' => env('RABBITMQ_SSL_PASSPHRASE', null),
],
],
],
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
'failed' => [
'database' => env('QUEUE_CONN', ''),
'table' => 'queue_failed_jobs',
],
];