src/Bunny/ChannelMethods.php
public function publish($body, array $headers = [], $exchange = '', $routingKey = '', $mandatory = false, $immediate = false)
    {
        return $this->getClient()->publish($this->getChannelId(), $body, $headers, $exchange, $routingKey, $mandatory, $immediate);
    }
public function publish($body, array $headers = [], $exchange = '', $routingKey = '', $mandatory = false, $immediate = false)
    {
        return $this->getClient()->publish($this->getChannelId(), $body, $headers, $exchange, $routingKey, $mandatory, $immediate);
    }
public function publish ( $ body , array $ headers = [ ] , $ exchange = '' , $ routingKey = '' , $ mandatory = false , $ immediate = false ) { return $ this -> getClient ( ) -> publish ( $ this -> getChannelId ( ) , $ body , $ headers , $ exchange , $ routingKey , $ mandatory , $ immediate ) ; }
Calls basic.publish AMQP method.

@param string $body
@param array $headers
@param string $exchange
@param string $routingKey
@param boolean $mandatory
@param boolean $immediate

@return boolean|Promise\PromiseInterface
Calls basic . publish AMQP method .