Przeglądaj źródła

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

shizhongqi 7 miesięcy temu
rodzic
commit
2da54480e9
1 zmienionych plików z 3 dodań i 1 usunięć
  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;