public function setupExchange($exchangeName, $exchangeType, $channel)
    {

        $channel->exchange_declare(
            $exchangeName,
            $exchangeType,
            $this->exchangeOptions['passive'],
            $this->exchangeOptions['durable'],
            $this->exchangeOptions['auto_delete']
        );

        return $channel;
    }
public function setupExchange($exchangeName, $exchangeType, $channel)
    {

        $channel->exchange_declare(
            $exchangeName,
            $exchangeType,
            $this->exchangeOptions['passive'],
            $this->exchangeOptions['durable'],
            $this->exchangeOptions['auto_delete']
        );

        return $channel;
    }
public function setupExchange ( $ exchangeName , $ exchangeType , $ channel ) { $ channel -> exchange_declare ( $ exchangeName , $ exchangeType , $ this -> exchangeOptions [ 'passive' ] , $ this -> exchangeOptions [ 'durable' ] , $ this -> exchangeOptions [ 'auto_delete' ] ) ; return $ channel ; }
setupExchange - common create exchange functionality used to ensure exchange
settings are the same for both producers and consumers. A producer will
never communicate with a queue directly, it's always through an exchange.

@param string $exchangeName
Name of the exchange that will bind to a queue

@param string $exchangeType
The exchange type

@param object $channel
The channel connection that the queue should use.

@return object $channel

passive: The exchange will survive server restarts

durable: The exchange won't be deleted once the channel is closed

auto_delete: The exchange won't be deleted once the channel is closed.
The exchange will survive server restarts

delete the exchange when something has bound to it and then
everything has unbound from it", which again only really makes sense in
the context of exchange to exchange bindings
https://groups.google.com/forum/#!topic/rabbitmq-discuss/YcM_zElQcq8

Debugging from command line:
$ rabbitmqctl list_exchanges
setupExchange - common create exchange functionality used to ensure exchange settings are the same for both producers and consumers . A producer will never communicate with a queue directly it s always through an exchange .