@@ -33,55 +33,57 @@ return [
3333 // should be in common.php
3434 'components' => [
3535 // ...
36- 'class' => \mikemadisonweb\rabbitmq\Configuration::class,
37- 'connections' => [
38- [
39- // You can pass these parameters as a single `url` option: https://www.rabbitmq.com/uri-spec.html
40- 'host' => 'YOUR_HOSTNAME',
41- 'port' => '5672',
42- 'user' => 'YOUR_USERNAME',
43- 'password' => 'YOUR_PASSWORD',
44- 'vhost' => '/',
45- ]
46- // When multiple connections is used you need to specify a `name` option for each one and define them in producer and consumer configuration blocks
47- ],
48- 'exchanges' => [
49- [
50- 'name' => 'YOUR_EXCHANGE_NAME',
51- 'type' => 'direct'
52- // Refer to Defaults section for all possible options
36+ 'rabbitmq' => [
37+ 'class' => \mikemadisonweb\rabbitmq\Configuration::class,
38+ 'connections' => [
39+ [
40+ // You can pass these parameters as a single `url` option: https://www.rabbitmq.com/uri-spec.html
41+ 'host' => 'YOUR_HOSTNAME',
42+ 'port' => '5672',
43+ 'user' => 'YOUR_USERNAME',
44+ 'password' => 'YOUR_PASSWORD',
45+ 'vhost' => '/',
46+ ]
47+ // When multiple connections is used you need to specify a `name` option for each one and define them in producer and consumer configuration blocks
5348 ],
54- ],
55- 'queues' => [
56- [
57- 'name' => 'YOUR_QUEUE_NAME',
58- // Queue can be configured here the way you want it:
59- //'durable' => true,
60- //'auto_delete' => false,
49+ 'exchanges' => [
50+ [
51+ 'name' => 'YOUR_EXCHANGE_NAME',
52+ 'type' => 'direct'
53+ // Refer to Defaults section for all possible options
54+ ],
6155 ],
62- [
63- 'name' => 'YOUR_ANOTHER_QUEUE_NAME',
56+ 'queues' => [
57+ [
58+ 'name' => 'YOUR_QUEUE_NAME',
59+ // Queue can be configured here the way you want it:
60+ //'durable' => true,
61+ //'auto_delete' => false,
62+ ],
63+ [
64+ 'name' => 'YOUR_ANOTHER_QUEUE_NAME',
65+ ],
6466 ],
65- ],
66- 'bindings' => [
67- [
68- 'queue ' => 'YOUR_QUEUE_NAME ',
69- 'exchange ' => 'YOUR_EXCHANGE_NAME' ,
70- 'routing_keys' => ['YOUR_ROUTING_KEY' ],
67+ 'bindings' => [
68+ [
69+ 'queue' => 'YOUR_QUEUE_NAME',
70+ 'exchange ' => 'YOUR_EXCHANGE_NAME ',
71+ 'routing_keys ' => ['YOUR_ROUTING_KEY'] ,
72+ ],
7173 ],
72- ],
73- 'producers' => [
74- [
75- 'name' => 'YOUR_PRODUCER_NAME' ,
74+ 'producers' => [
75+ [
76+ 'name' => 'YOUR_PRODUCER_NAME',
77+ ] ,
7678 ],
77- ],
78- 'consumers' => [
79- [
80- 'name' => 'YOUR_CONSUMER_NAME',
81- // Every consumer should define one or more callbacks for corresponding queues
82- 'callbacks' => [
83- // queue name => callback class name
84- 'YOUR_QUEUE_NAME' => \path\to\YourConsumer::class ,
79+ 'consumers' => [
80+ [
81+ 'name' => 'YOUR_CONSUMER_NAME',
82+ // Every consumer should define one or more callbacks for corresponding queues
83+ ' callbacks' => [
84+ // queue name => callback class name
85+ 'YOUR_QUEUE_NAME' => \path\to\YourConsumer:: class,
86+ ] ,
8587 ],
8688 ],
8789 ],
0 commit comments