|
|
@@ -24,14 +24,11 @@ $rabbitMQ = [
|
|
|
[
|
|
|
'name' => 'stockExchange',
|
|
|
'type' => 'direct',
|
|
|
+ 'durable' => true,
|
|
|
],
|
|
|
[
|
|
|
'name' => 'notifyExchange',
|
|
|
'type' => 'direct',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'ex1',
|
|
|
- 'type' => 'direct'
|
|
|
]
|
|
|
],
|
|
|
|
|
|
@@ -39,10 +36,6 @@ $rabbitMQ = [
|
|
|
* 队列
|
|
|
*/
|
|
|
'queues' => [
|
|
|
- [
|
|
|
- 'name' => 'queues1',
|
|
|
- 'passive' => false,
|
|
|
- ],
|
|
|
[
|
|
|
'name' => 'customQueue',
|
|
|
'passive' => false,
|
|
|
@@ -50,6 +43,7 @@ $rabbitMQ = [
|
|
|
[
|
|
|
'name' => 'stockQueue',
|
|
|
'passive' => false,
|
|
|
+ 'durable' => true,
|
|
|
],
|
|
|
[
|
|
|
'name' => 'notifyQueue',
|
|
|
@@ -76,12 +70,7 @@ $rabbitMQ = [
|
|
|
'queue' => 'notifyQueue',
|
|
|
'exchange' => 'notifyExchange',
|
|
|
'routing_keys' => ['notifyRoute'],
|
|
|
- ],
|
|
|
- [
|
|
|
- 'queue' => 'queues1',
|
|
|
- 'exchange' => 'ex1',
|
|
|
- 'routing_keys' => ['route1'],
|
|
|
- ],
|
|
|
+ ]
|
|
|
],
|
|
|
|
|
|
/**
|
|
|
@@ -99,9 +88,6 @@ $rabbitMQ = [
|
|
|
[
|
|
|
//通知生产者
|
|
|
'name' => 'notifyProducer',
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'importDataProducer',
|
|
|
]
|
|
|
],
|
|
|
|
|
|
@@ -129,12 +115,6 @@ $rabbitMQ = [
|
|
|
'callbacks' => [
|
|
|
'notifyQueue' => '\common\components\rabbitmq\notifyConsumer',
|
|
|
]
|
|
|
- ],
|
|
|
- [
|
|
|
- 'name' => 'importDataConsumer',
|
|
|
- 'callbacks' => [
|
|
|
- 'queues1' => '\common\components\rabbitmq\importDataConsumer',
|
|
|
- ],
|
|
|
]
|
|
|
],
|
|
|
];
|