Exemplo n.º 1
0
 /**
  * @param Queue $queue
  * @param MessageInterface $message
  * @return void
  */
 protected function cleanMessageInfo(Queue $queue, MessageInterface $message)
 {
     $metadatumKey = $queue->getOptions()->getMessageMetadatumKey();
     if ($message->getMetadata($metadatumKey)) {
         $message->setMetadata($metadatumKey, null);
     }
 }
Exemplo n.º 2
0
 /**
  * Processes a message and returns the result.
  *
  * @param  MessageInterface   $message The message to process
  * @return mixed The result.
  */
 public function process(MessageInterface $message)
 {
     return $this->worker->forward()->dispatch($message->getContent(), $message->getMetadata());
 }