Exemplo n.º 1
0
 /**
  * Send a message to the specified queue.
  *
  * @param  string $queueId
  * @param  string $message
  * @param  array  $options
  * @return string Message ID
  */
 public function sendMessage($queueId, $message, $options = null)
 {
     try {
         if ($queueId instanceof \Zend\Service\WindowsAzure\Storage\QueueInstance) {
             $queueId = $queueId->Name;
         }
         return $this->_storageClient->putMessage($queueId, $message, $options[self::MESSAGE_TTL]);
     } catch (WindowsAzureException\ExceptionInterface $e) {
         throw new Exception\RuntimeException('Error on sending message: ' . $e->getMessage(), $e->getCode(), $e);
     }
 }