public function pushToQueue($queue, $message)
    {
        $message = $message instanceof AMQPMessage
            ? $message
            : new AMQPMessage($message);

        $this->getChannel()->queue_declare($queue);
        $this->getChannel()->basic_publish($message, '', $queue);
    }
public function pushToQueue($queue, $message)
    {
        $message = $message instanceof AMQPMessage
            ? $message
            : new AMQPMessage($message);

        $this->getChannel()->queue_declare($queue);
        $this->getChannel()->basic_publish($message, '', $queue);
    }
public function pushToQueue ( $ queue , $ message ) { $ message = $ message instanceof AMQPMessage ? $ message : new AMQPMessage ( $ message ) ; $ this -> getChannel ( ) -> queue_declare ( $ queue ) ; $ this -> getChannel ( ) -> basic_publish ( $ message , '' , $ queue ) ; }
Sends message to queue

``` php
<?php
$I->pushToQueue('queue.jobs', 'create user');
$I->pushToQueue('queue.jobs', new AMQPMessage('create'));
?>
```

@param string $queue
@param string|\PhpAmqpLib\Message\AMQPMessage $message
Sends message to queue