Example #1
0
 /**
  * 重新放回队列
  * @param null       $queue
  * @param MQSMessage $message
  * @param            $delay
  */
 public function release($queue = null, MQSMessage $message, $delay)
 {
     if (is_null($queue)) {
         $queue = $this->queue_name;
     }
     if ($delay < 1) {
         $delay = 1;
     }
     $this->client->changeMessageVisibility($queue, $message->getReceiptHandle(), $delay);
 }
Example #2
0
 /**
  * Get the raw body string for the job.
  *
  * @return string
  */
 public function getRawBody()
 {
     return $this->message->getMessageBody();
 }