|
|
@@ -6,6 +6,7 @@
|
|
|
|
|
|
namespace common\components\rabbitmq;
|
|
|
|
|
|
+use common\components\noticeUtil;
|
|
|
use mikemadisonweb\rabbitmq\components\ConsumerInterface;
|
|
|
use PhpAmqpLib\Message\AMQPMessage;
|
|
|
use Yii;
|
|
|
@@ -28,12 +29,10 @@ class customConsumer implements ConsumerInterface
|
|
|
// 反序列化消息体
|
|
|
$data = unserialize($msg->body);
|
|
|
if (!is_array($data)) {
|
|
|
- Yii::error("Invalid custom message format: {$msg->body}", 'rabbitmq.custom');
|
|
|
+ noticeUtil::push("客户的消费者报错:Invalid notify message format: {$msg->body}", '15280215347');
|
|
|
return ConsumerInterface::MSG_REJECT;
|
|
|
}
|
|
|
-
|
|
|
- Yii::info("Processing custom message: " . json_encode($data), 'rabbitmq.custom');
|
|
|
-
|
|
|
+ //print_r($data);
|
|
|
// 根据操作类型分发处理
|
|
|
$action = $data['action'] ?? null;
|
|
|
switch ($action) {
|