public function postMessage($queue_name, $message, $properties = array())
    {
        $msg = new IronMQMessage($message, $properties);
        $req = array(
            "messages" => array($msg->asArray()),
        );
        $this->setJsonHeaders();
        $queue = rawurlencode($queue_name);
        $url = "projects/{$this->project_id}/queues/$queue/messages";
        $res = $this->apiCall(self::POST, $url, $req);
        $decoded = self::json_decode($res);
        $decoded->id = $decoded->ids[0];
        return $decoded;
    }
public function postMessage($queue_name, $message, $properties = array())
    {
        $msg = new IronMQMessage($message, $properties);
        $req = array(
            "messages" => array($msg->asArray()),
        );
        $this->setJsonHeaders();
        $queue = rawurlencode($queue_name);
        $url = "projects/{$this->project_id}/queues/$queue/messages";
        $res = $this->apiCall(self::POST, $url, $req);
        $decoded = self::json_decode($res);
        $decoded->id = $decoded->ids[0];
        return $decoded;
    }
public function postMessage ( $ queue_name , $ message , $ properties = array ( ) ) { $ msg = new IronMQMessage ( $ message , $ properties ) ; $ req = array ( "messages" => array ( $ msg -> asArray ( ) ) , ) ; $ this -> setJsonHeaders ( ) ; $ queue = rawurlencode ( $ queue_name ) ; $ url = "projects/{$this->project_id}/queues/$queue/messages" ; $ res = $ this -> apiCall ( self :: POST , $ url , $ req ) ; $ decoded = self :: json_decode ( $ res ) ; $ decoded -> id = $ decoded -> ids [ 0 ] ; return $ decoded ; }
Push a message on the queue

Examples:
<code>
$ironmq->postMessage("test_queue", "Hello world");
</code>
<code>
$ironmq->postMessage("test_queue", "Test Message", array(
'timeout' => 120,
'delay' => 2,
'expires_in' => 2*24*3600 # 2 days
));
</code>

@param string $queue_name Name of the queue.
@param string $message
@param array $properties
@return mixed
Push a message on the queue