Просмотр исходного кода

根据消费的状态进行返回调整

shizhongqi 7 месяцев назад
Родитель
Сommit
2da54480e9
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      common/components/rabbitmq/ptConsumer.php

+ 3 - 1
common/components/rabbitmq/ptConsumer.php

@@ -49,8 +49,10 @@ class ptConsumer implements ConsumerInterface
                     $result = false;
             }
 
-            if ($result) {
+            if ($result == ConsumerInterface::MSG_ACK) {
                 return ConsumerInterface::MSG_ACK;
+            } elseif ($result == ConsumerInterface::MSG_REJECT){
+                return ConsumerInterface::MSG_REJECT;
             } else {
                 noticeUtil::push("跑腿发单的消费者报错:Notify message processing failed", '15280215347');
                 return ConsumerInterface::MSG_REQUEUE;