/**
  * 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);
 }
 /**
  * @param $queueName
  * @param $message
  * @internal param Kontoulis\RabbitMQLaravel\Message\Message $msg
  */
 public function sendMessage($message, $queueName = null)
 {
     if (is_null($queueName)) {
         $queueName = $this->queueName;
     }
     $msg = new Message($queueName, ["message" => $message]);
     /* 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);
 }