|
|
@@ -47,7 +47,7 @@ class TestController extends BaseController
|
|
|
$msg = serialize(['user_id' => rand(111, 999)]);
|
|
|
$producer->publish($msg, 'ex1', 'route1');
|
|
|
|
|
|
- $producer = Yii::$app->rabbitmq->getProducer('notifyConsumer');
|
|
|
+ $producer = Yii::$app->rabbitmq->getProducer('notifyProducer');
|
|
|
$msg = serialize(['type' => 'order_new', 'msg' => '你有新订单']);
|
|
|
$producer->publish($msg, 'notifyExchange', 'notifyRoute');
|
|
|
}
|