Esempio n. 1
0
 /**
  * @param Message $msg
  */
 public function sendMessage(Message $msg)
 {
     /* Create the message */
     $amqpMessage = $msg->getAMQPMessage();
     /* Create queue */
     $this->channel->queue_declare($msg->queueName, false, true, false, false);
     /* Publish message */
     $this->channel->basic_publish($amqpMessage, '', $msg->queueName);
 }
 /**
  * Tries to process the incoming message.
  * @param Message $msg
  * @return int One of the possible return values defined as Handler
  * constants.
  */
 public function tryProcessing(Message $msg)
 {
     return $this->handleSuccess($msg->getAMQPMessage()->body);
 }