1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace OldSound\RabbitMqBundle\DependencyInjection; |
4
|
|
|
|
5
|
|
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
6
|
|
|
use Symfony\Component\Config\Definition\ConfigurationInterface; |
7
|
|
|
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Configuration |
11
|
|
|
* |
12
|
|
|
* @author Marc Weistroff <[email protected]> |
13
|
|
|
*/ |
14
|
|
|
class Configuration implements ConfigurationInterface |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* @var string |
18
|
|
|
*/ |
19
|
|
|
protected $name; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* Configuration constructor. |
23
|
|
|
* |
24
|
|
|
* @param string $name |
25
|
|
|
*/ |
26
|
34 |
|
public function __construct($name) |
27
|
|
|
{ |
28
|
34 |
|
$this->name = $name; |
29
|
34 |
|
} |
30
|
|
|
|
31
|
34 |
|
public function getConfigTreeBuilder() |
32
|
|
|
{ |
33
|
34 |
|
$tree = new TreeBuilder($this->name); |
34
|
|
|
/** @var ArrayNodeDefinition $rootNode */ |
35
|
34 |
|
$rootNode = $tree->getRootNode(); |
36
|
|
|
|
37
|
|
|
$rootNode |
38
|
34 |
|
->children() |
39
|
34 |
|
->booleanNode('debug')->defaultValue('%kernel.debug%')->end() |
40
|
34 |
|
->booleanNode('enable_collector')->defaultValue(false)->end() |
|
|
|
|
41
|
34 |
|
->booleanNode('sandbox')->defaultValue(false)->end() |
42
|
34 |
|
->end() |
43
|
|
|
; |
44
|
|
|
|
45
|
34 |
|
$this->addConnections($rootNode); |
46
|
34 |
|
$this->addBindings($rootNode); |
47
|
34 |
|
$this->addProducers($rootNode); |
48
|
34 |
|
$this->addConsumers($rootNode); |
49
|
34 |
|
$this->addMultipleConsumers($rootNode); |
50
|
34 |
|
$this->addDynamicConsumers($rootNode); |
51
|
34 |
|
$this->addBatchConsumers($rootNode); |
52
|
34 |
|
$this->addAnonConsumers($rootNode); |
53
|
34 |
|
$this->addRpcClients($rootNode); |
54
|
34 |
|
$this->addRpcServers($rootNode); |
55
|
|
|
|
56
|
34 |
|
return $tree; |
57
|
|
|
} |
58
|
|
|
|
59
|
34 |
|
protected function addConnections(ArrayNodeDefinition $node) |
60
|
|
|
{ |
61
|
|
|
$node |
62
|
34 |
|
->fixXmlConfig('connection') |
63
|
34 |
|
->children() |
64
|
34 |
|
->arrayNode('connections') |
65
|
34 |
|
->useAttributeAsKey('key') |
66
|
34 |
|
->canBeUnset() |
67
|
34 |
|
->prototype('array') |
68
|
34 |
|
->children() |
69
|
34 |
|
->scalarNode('url')->defaultValue('')->end() |
70
|
34 |
|
->scalarNode('host')->defaultValue('localhost')->end() |
71
|
34 |
|
->scalarNode('port')->defaultValue(5672)->end() |
72
|
34 |
|
->scalarNode('user')->defaultValue('guest')->end() |
73
|
34 |
|
->scalarNode('password')->defaultValue('guest')->end() |
74
|
34 |
|
->scalarNode('vhost')->defaultValue('/')->end() |
75
|
34 |
|
->arrayNode('hosts') |
76
|
34 |
|
->info('connection_timeout, read_write_timeout, use_socket, ssl_context, keepalive, |
77
|
|
|
heartbeat and connection_parameters_provider should be specified globally when |
78
|
|
|
you are using multiple hosts') |
79
|
34 |
|
->canBeUnset() |
80
|
34 |
|
->prototype('array') |
81
|
34 |
|
->children() |
82
|
34 |
|
->scalarNode('url')->defaultValue('')->end() |
83
|
34 |
|
->scalarNode('host')->defaultValue('localhost')->end() |
84
|
34 |
|
->scalarNode('port')->defaultValue(5672)->end() |
85
|
34 |
|
->scalarNode('user')->defaultValue('guest')->end() |
86
|
34 |
|
->scalarNode('password')->defaultValue('guest')->end() |
87
|
34 |
|
->scalarNode('vhost')->defaultValue('/')->end() |
88
|
34 |
|
->end() |
89
|
34 |
|
->end() |
90
|
34 |
|
->end() |
91
|
34 |
|
->booleanNode('lazy')->defaultFalse()->end() |
92
|
34 |
|
->scalarNode('connection_timeout')->defaultValue(3)->end() |
93
|
34 |
|
->scalarNode('read_write_timeout')->defaultValue(3)->end() |
94
|
34 |
|
->booleanNode('use_socket')->defaultValue(false)->end() |
95
|
34 |
|
->arrayNode('ssl_context') |
96
|
34 |
|
->useAttributeAsKey('key') |
97
|
34 |
|
->canBeUnset() |
98
|
34 |
|
->prototype('variable')->end() |
99
|
34 |
|
->end() |
100
|
34 |
|
->booleanNode('keepalive')->defaultFalse()->info('requires php-amqplib v2.4.1+ and PHP5.4+')->end() |
101
|
34 |
|
->scalarNode('heartbeat')->defaultValue(0)->info('requires php-amqplib v2.4.1+')->end() |
102
|
34 |
|
->scalarNode('connection_parameters_provider')->end() |
103
|
34 |
|
->end() |
104
|
34 |
|
->end() |
105
|
34 |
|
->end() |
106
|
34 |
|
->end() |
107
|
|
|
; |
108
|
34 |
|
} |
109
|
|
|
|
110
|
34 |
|
protected function addProducers(ArrayNodeDefinition $node) |
111
|
|
|
{ |
112
|
|
|
$node |
113
|
34 |
|
->fixXmlConfig('producer') |
114
|
34 |
|
->children() |
115
|
34 |
|
->arrayNode('producers') |
116
|
34 |
|
->canBeUnset() |
117
|
34 |
|
->useAttributeAsKey('key') |
118
|
34 |
|
->prototype('array') |
119
|
34 |
|
->append($this->getExchangeConfiguration()) |
|
|
|
|
120
|
34 |
|
->append($this->getQueueConfiguration()) |
121
|
34 |
|
->append($this->getValidatorConfiguration()) |
122
|
34 |
|
->children() |
123
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
124
|
34 |
|
->scalarNode('auto_setup_fabric')->defaultTrue()->end() |
125
|
34 |
|
->scalarNode('class')->defaultValue('%old_sound_rabbit_mq.producer.class%')->end() |
126
|
34 |
|
->scalarNode('enable_logger')->defaultFalse()->end() |
127
|
34 |
|
->scalarNode('service_alias')->defaultValue(null)->end() |
128
|
34 |
|
->scalarNode('default_routing_key')->defaultValue('')->end() |
129
|
34 |
|
->end() |
130
|
34 |
|
->end() |
131
|
|
|
->end() |
132
|
34 |
|
->end() |
133
|
|
|
; |
134
|
34 |
|
} |
135
|
|
|
|
136
|
|
|
protected function addBindings(ArrayNodeDefinition $node) |
137
|
34 |
|
{ |
138
|
34 |
|
$node |
139
|
34 |
|
->fixXmlConfig('binding') |
140
|
34 |
|
->children() |
141
|
34 |
|
->arrayNode('bindings') |
142
|
34 |
|
->canBeUnset() |
143
|
34 |
|
->prototype('array') |
144
|
34 |
|
->children() |
145
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
146
|
34 |
|
->scalarNode('exchange')->defaultNull()->end() |
147
|
34 |
|
->scalarNode('destination')->defaultNull()->end() |
148
|
34 |
|
->scalarNode('routing_key')->defaultNull()->end() |
149
|
34 |
|
->booleanNode('nowait')->defaultFalse()->end() |
150
|
34 |
|
->booleanNode('destination_is_exchange')->defaultFalse()->end() |
151
|
34 |
|
->variableNode('arguments')->defaultNull()->end() |
152
|
34 |
|
->scalarNode('class')->defaultValue('%old_sound_rabbit_mq.binding.class%')->end() |
153
|
34 |
|
->end() |
154
|
34 |
|
->end() |
155
|
|
|
->end() |
156
|
34 |
|
->end() |
157
|
|
|
; |
158
|
34 |
|
} |
159
|
|
|
|
160
|
|
|
protected function addConsumers(ArrayNodeDefinition $node) |
161
|
34 |
|
{ |
162
|
34 |
|
$node |
163
|
34 |
|
->fixXmlConfig('consumer') |
164
|
34 |
|
->children() |
165
|
34 |
|
->arrayNode('consumers') |
166
|
34 |
|
->canBeUnset() |
167
|
34 |
|
->useAttributeAsKey('key') |
168
|
34 |
|
->prototype('array') |
169
|
34 |
|
->append($this->getExchangeConfiguration()) |
170
|
34 |
|
->append($this->getQueueConfiguration()) |
171
|
34 |
|
->children() |
172
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
173
|
34 |
|
->scalarNode('callback')->isRequired()->end() |
174
|
34 |
|
->scalarNode('idle_timeout')->end() |
175
|
34 |
|
->scalarNode('idle_timeout_exit_code')->end() |
176
|
34 |
|
->scalarNode('timeout_wait')->end() |
177
|
34 |
|
->arrayNode('graceful_max_execution') |
178
|
34 |
|
->canBeUnset() |
179
|
34 |
|
->children() |
180
|
34 |
|
->integerNode('timeout')->end() |
181
|
34 |
|
->integerNode('exit_code')->defaultValue(0)->end() |
182
|
34 |
|
->end() |
183
|
34 |
|
->end() |
184
|
34 |
|
->scalarNode('auto_setup_fabric')->defaultTrue()->end() |
185
|
34 |
|
->arrayNode('qos_options') |
186
|
34 |
|
->canBeUnset() |
187
|
34 |
|
->children() |
188
|
34 |
|
->scalarNode('prefetch_size')->defaultValue(0)->end() |
189
|
34 |
|
->scalarNode('prefetch_count')->defaultValue(0)->end() |
190
|
34 |
|
->booleanNode('global')->defaultFalse()->end() |
191
|
34 |
|
->end() |
192
|
34 |
|
->end() |
193
|
34 |
|
->scalarNode('enable_logger')->defaultFalse()->end() |
194
|
34 |
|
->end() |
195
|
34 |
|
->end() |
196
|
|
|
->end() |
197
|
34 |
|
->end() |
198
|
|
|
; |
199
|
34 |
|
} |
200
|
|
|
|
201
|
|
|
protected function addMultipleConsumers(ArrayNodeDefinition $node) |
202
|
34 |
|
{ |
203
|
34 |
|
$node |
204
|
34 |
|
->fixXmlConfig('multiple_consumer') |
205
|
34 |
|
->children() |
206
|
34 |
|
->arrayNode('multiple_consumers') |
207
|
34 |
|
->canBeUnset() |
208
|
34 |
|
->useAttributeAsKey('key') |
209
|
34 |
|
->prototype('array') |
210
|
34 |
|
->append($this->getExchangeConfiguration()) |
211
|
34 |
|
->children() |
212
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
213
|
34 |
|
->scalarNode('idle_timeout')->end() |
214
|
34 |
|
->scalarNode('idle_timeout_exit_code')->end() |
215
|
34 |
|
->scalarNode('timeout_wait')->end() |
216
|
34 |
|
->scalarNode('auto_setup_fabric')->defaultTrue()->end() |
217
|
34 |
|
->arrayNode('graceful_max_execution') |
218
|
34 |
|
->canBeUnset() |
219
|
34 |
|
->children() |
220
|
34 |
|
->integerNode('timeout')->end() |
221
|
34 |
|
->integerNode('exit_code')->defaultValue(0)->end() |
222
|
34 |
|
->end() |
223
|
34 |
|
->end() |
224
|
34 |
|
->append($this->getMultipleQueuesConfiguration()) |
225
|
34 |
|
->arrayNode('qos_options') |
226
|
34 |
|
->canBeUnset() |
227
|
34 |
|
->children() |
228
|
34 |
|
->scalarNode('prefetch_size')->defaultValue(0)->end() |
229
|
34 |
|
->scalarNode('prefetch_count')->defaultValue(0)->end() |
230
|
34 |
|
->booleanNode('global')->defaultFalse()->end() |
231
|
34 |
|
->end() |
232
|
34 |
|
->end() |
233
|
34 |
|
->scalarNode('queues_provider')->defaultNull()->end() |
234
|
34 |
|
->scalarNode('enable_logger')->defaultFalse()->end() |
235
|
34 |
|
->end() |
236
|
|
|
->end() |
237
|
34 |
|
->end() |
238
|
|
|
; |
239
|
34 |
|
} |
240
|
|
|
|
241
|
|
|
protected function addDynamicConsumers(ArrayNodeDefinition $node) |
242
|
34 |
|
{ |
243
|
34 |
|
$node |
244
|
34 |
|
->fixXmlConfig('dynamic_consumer') |
245
|
34 |
|
->children() |
246
|
34 |
|
->arrayNode('dynamic_consumers') |
247
|
34 |
|
->canBeUnset() |
248
|
34 |
|
->useAttributeAsKey('key') |
249
|
34 |
|
->prototype('array') |
250
|
34 |
|
->append($this->getExchangeConfiguration()) |
251
|
34 |
|
->children() |
252
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
253
|
34 |
|
->scalarNode('callback')->isRequired()->end() |
254
|
34 |
|
->scalarNode('idle_timeout')->end() |
255
|
34 |
|
->scalarNode('idle_timeout_exit_code')->end() |
256
|
34 |
|
->scalarNode('timeout_wait')->end() |
257
|
34 |
|
->arrayNode('graceful_max_execution') |
258
|
34 |
|
->canBeUnset() |
259
|
34 |
|
->children() |
260
|
34 |
|
->integerNode('timeout')->end() |
261
|
34 |
|
->integerNode('exit_code')->defaultValue(0)->end() |
262
|
34 |
|
->end() |
263
|
34 |
|
->end() |
264
|
34 |
|
->scalarNode('auto_setup_fabric')->defaultTrue()->end() |
265
|
34 |
|
->arrayNode('qos_options') |
266
|
34 |
|
->canBeUnset() |
267
|
34 |
|
->children() |
268
|
34 |
|
->scalarNode('prefetch_size')->defaultValue(0)->end() |
269
|
34 |
|
->scalarNode('prefetch_count')->defaultValue(0)->end() |
270
|
34 |
|
->booleanNode('global')->defaultFalse()->end() |
271
|
34 |
|
->end() |
272
|
34 |
|
->end() |
273
|
34 |
|
->scalarNode('queue_options_provider')->isRequired()->end() |
274
|
34 |
|
->scalarNode('enable_logger')->defaultFalse()->end() |
275
|
34 |
|
->end() |
276
|
34 |
|
->end() |
277
|
|
|
->end() |
278
|
34 |
|
->end() |
279
|
|
|
; |
280
|
|
|
} |
281
|
|
|
|
282
|
|
|
/** |
283
|
|
|
* @param ArrayNodeDefinition $node |
284
|
|
|
* |
285
|
34 |
|
* @return void |
286
|
|
|
*/ |
287
|
|
|
protected function addBatchConsumers(ArrayNodeDefinition $node) |
288
|
34 |
|
{ |
289
|
34 |
|
$node |
290
|
34 |
|
->children() |
291
|
34 |
|
->arrayNode('batch_consumers') |
292
|
34 |
|
->canBeUnset() |
293
|
34 |
|
->useAttributeAsKey('key') |
294
|
34 |
|
->prototype('array') |
295
|
34 |
|
->append($this->getExchangeConfiguration()) |
296
|
34 |
|
->append($this->getQueueConfiguration()) |
297
|
34 |
|
->children() |
298
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
299
|
34 |
|
->scalarNode('callback')->isRequired()->end() |
300
|
34 |
|
->scalarNode('idle_timeout')->end() |
301
|
34 |
|
->scalarNode('timeout_wait')->defaultValue(3)->end() |
302
|
34 |
|
->scalarNode('idle_timeout_exit_code')->end() |
303
|
34 |
|
->scalarNode('keep_alive')->defaultFalse()->end() |
304
|
34 |
|
->arrayNode('graceful_max_execution') |
305
|
34 |
|
->canBeUnset() |
306
|
34 |
|
->children() |
307
|
34 |
|
->integerNode('timeout')->end() |
308
|
34 |
|
->end() |
309
|
34 |
|
->end() |
310
|
34 |
|
->scalarNode('auto_setup_fabric')->defaultTrue()->end() |
311
|
34 |
|
->arrayNode('qos_options') |
312
|
34 |
|
->children() |
313
|
34 |
|
->scalarNode('prefetch_size')->defaultValue(0)->end() |
314
|
34 |
|
->scalarNode('prefetch_count')->defaultValue(2)->end() |
315
|
34 |
|
->booleanNode('global')->defaultFalse()->end() |
316
|
34 |
|
->end() |
317
|
34 |
|
->end() |
318
|
34 |
|
->scalarNode('enable_logger')->defaultFalse()->end() |
319
|
34 |
|
->end() |
320
|
34 |
|
->end() |
321
|
|
|
->end() |
322
|
34 |
|
->end() |
323
|
|
|
; |
324
|
34 |
|
} |
325
|
|
|
|
326
|
|
|
protected function addAnonConsumers(ArrayNodeDefinition $node) |
327
|
34 |
|
{ |
328
|
34 |
|
$node |
329
|
34 |
|
->fixXmlConfig('anon_consumer') |
330
|
34 |
|
->children() |
331
|
34 |
|
->arrayNode('anon_consumers') |
332
|
34 |
|
->canBeUnset() |
333
|
34 |
|
->useAttributeAsKey('key') |
334
|
34 |
|
->prototype('array') |
335
|
34 |
|
->append($this->getExchangeConfiguration()) |
336
|
34 |
|
->children() |
337
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
338
|
34 |
|
->scalarNode('callback')->isRequired()->end() |
339
|
34 |
|
->end() |
340
|
34 |
|
->end() |
341
|
|
|
->end() |
342
|
34 |
|
->end() |
343
|
|
|
; |
344
|
34 |
|
} |
345
|
|
|
|
346
|
|
|
protected function addRpcClients(ArrayNodeDefinition $node) |
347
|
34 |
|
{ |
348
|
34 |
|
$node |
349
|
34 |
|
->fixXmlConfig('rpc_client') |
350
|
34 |
|
->children() |
351
|
34 |
|
->arrayNode('rpc_clients') |
352
|
34 |
|
->canBeUnset() |
353
|
34 |
|
->useAttributeAsKey('key') |
354
|
34 |
|
->prototype('array') |
355
|
34 |
|
->children() |
356
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
357
|
34 |
|
->booleanNode('expect_serialized_response')->defaultTrue()->end() |
358
|
34 |
|
->scalarNode('unserializer')->defaultValue('unserialize')->end() |
359
|
34 |
|
->booleanNode('lazy')->defaultFalse()->end() |
360
|
34 |
|
->booleanNode('direct_reply_to')->defaultFalse()->end() |
361
|
34 |
|
->end() |
362
|
34 |
|
->end() |
363
|
|
|
->end() |
364
|
34 |
|
->end() |
365
|
|
|
; |
366
|
34 |
|
} |
367
|
|
|
|
368
|
|
|
protected function addRpcServers(ArrayNodeDefinition $node) |
369
|
34 |
|
{ |
370
|
34 |
|
$node |
371
|
34 |
|
->fixXmlConfig('rpc_server') |
372
|
34 |
|
->children() |
373
|
34 |
|
->arrayNode('rpc_servers') |
374
|
34 |
|
->canBeUnset() |
375
|
34 |
|
->useAttributeAsKey('key') |
376
|
34 |
|
->prototype('array') |
377
|
34 |
|
->append($this->getExchangeConfiguration()) |
378
|
34 |
|
->append($this->getQueueConfiguration()) |
379
|
34 |
|
->children() |
380
|
34 |
|
->scalarNode('connection')->defaultValue('default')->end() |
381
|
34 |
|
->scalarNode('callback')->isRequired()->end() |
382
|
34 |
|
->arrayNode('qos_options') |
383
|
34 |
|
->canBeUnset() |
384
|
34 |
|
->children() |
385
|
34 |
|
->scalarNode('prefetch_size')->defaultValue(0)->end() |
386
|
34 |
|
->scalarNode('prefetch_count')->defaultValue(0)->end() |
387
|
34 |
|
->booleanNode('global')->defaultFalse()->end() |
388
|
34 |
|
->end() |
389
|
34 |
|
->end() |
390
|
34 |
|
->scalarNode('serializer')->defaultValue('serialize')->end() |
391
|
34 |
|
->scalarNode('enable_logger')->defaultFalse()->end() |
392
|
34 |
|
->end() |
393
|
34 |
|
->end() |
394
|
|
|
->end() |
395
|
34 |
|
->end() |
396
|
|
|
; |
397
|
34 |
|
} |
398
|
|
|
|
399
|
34 |
|
protected function getValidatorConfiguration() |
400
|
|
|
{ |
401
|
|
|
$node = new ArrayNodeDefinition('validator'); |
402
|
34 |
|
|
403
|
34 |
|
return $node |
404
|
34 |
|
->children() |
405
|
34 |
|
->scalarNode('class')->isRequired()->end() |
406
|
34 |
|
->scalarNode('schema')->isRequired()->end() |
|
|
|
|
407
|
34 |
|
->variableNode('additionalProperties')->defaultNull()->end() |
408
|
34 |
|
->end() |
409
|
34 |
|
; |
410
|
34 |
|
} |
411
|
34 |
|
|
412
|
34 |
|
protected function getExchangeConfiguration() |
413
|
34 |
|
{ |
414
|
|
|
$node = new ArrayNodeDefinition('exchange_options'); |
415
|
|
|
|
416
|
|
|
return $node |
417
|
34 |
|
->children() |
418
|
|
|
->scalarNode('name')->isRequired()->end() |
419
|
34 |
|
->scalarNode('type')->isRequired()->end() |
420
|
|
|
->booleanNode('passive')->defaultValue(false)->end() |
421
|
34 |
|
->booleanNode('durable')->defaultValue(true)->end() |
422
|
|
|
->booleanNode('auto_delete')->defaultValue(false)->end() |
423
|
34 |
|
->booleanNode('internal')->defaultValue(false)->end() |
424
|
|
|
->booleanNode('nowait')->defaultValue(false)->end() |
425
|
|
|
->booleanNode('declare')->defaultValue(true)->end() |
426
|
34 |
|
->variableNode('arguments')->defaultNull()->end() |
427
|
|
|
->scalarNode('ticket')->defaultNull()->end() |
428
|
34 |
|
->end() |
429
|
34 |
|
; |
430
|
|
|
} |
431
|
34 |
|
|
432
|
|
|
protected function getQueueConfiguration() |
433
|
34 |
|
{ |
434
|
34 |
|
$node = new ArrayNodeDefinition('queue_options'); |
435
|
34 |
|
|
436
|
|
|
$this->addQueueNodeConfiguration($node); |
437
|
34 |
|
|
438
|
|
|
return $node; |
439
|
34 |
|
} |
440
|
|
|
|
441
|
|
|
protected function getMultipleQueuesConfiguration() |
442
|
34 |
|
{ |
443
|
|
|
$node = new ArrayNodeDefinition('queues'); |
444
|
|
|
$prototypeNode = $node->prototype('array'); |
445
|
34 |
|
|
446
|
34 |
|
$this->addQueueNodeConfiguration($prototypeNode); |
447
|
34 |
|
|
448
|
34 |
|
$prototypeNode->children() |
449
|
34 |
|
->scalarNode('callback')->isRequired()->end() |
450
|
34 |
|
->end(); |
451
|
34 |
|
|
452
|
34 |
|
$prototypeNode->end(); |
453
|
34 |
|
|
454
|
34 |
|
return $node; |
455
|
34 |
|
} |
456
|
34 |
|
|
457
|
34 |
|
protected function addQueueNodeConfiguration(ArrayNodeDefinition $node) |
458
|
34 |
|
{ |
459
|
34 |
|
$node |
460
|
34 |
|
->fixXmlConfig('routing_key') |
461
|
|
|
->children() |
462
|
34 |
|
->scalarNode('name')->end() |
463
|
|
|
->booleanNode('passive')->defaultFalse()->end() |
464
|
|
|
->booleanNode('durable')->defaultTrue()->end() |
465
|
|
|
->booleanNode('exclusive')->defaultFalse()->end() |
466
|
|
|
->booleanNode('auto_delete')->defaultFalse()->end() |
467
|
|
|
->booleanNode('nowait')->defaultFalse()->end() |
468
|
|
|
->booleanNode('declare')->defaultTrue()->end() |
469
|
|
|
->variableNode('arguments')->defaultNull()->end() |
470
|
|
|
->scalarNode('ticket')->defaultNull()->end() |
471
|
|
|
->arrayNode('routing_keys') |
472
|
|
|
->prototype('scalar')->end() |
473
|
|
|
->defaultValue(array()) |
474
|
|
|
->end() |
475
|
|
|
->end() |
476
|
|
|
; |
477
|
|
|
} |
478
|
|
|
} |
479
|
|
|
|