Example #1
0
 /**
  * Add message to queue
  *
  * @param MessageInterface $message
  *
  * @return bool
  *
  * @throws \RuntimeException
  */
 public function addMessage(MessageInterface $message)
 {
     if (!$this->adapter) {
         throw new \RuntimeException('Can\'t send message to queue. Adapter not found.');
     }
     return $this->adapter->addMessage($message);
 }