public function exchange($name, $options = [])
    {
        if (empty($this->_exchanges[$name])) {
            $channel = $this->channel($name, $options);
            $exchange = new AMQPExchange($channel);
            $exchange->setName($name);

            if (!empty($options['type'])) {
                $exchange->setType($options['type']);
            }

            if (!empty($options['flags'])) {
                $exchange->setFlags($options['flags']);
            }

            $this->_exchanges[$name] = $exchange;
        }

        return $this->_exchanges[$name];
    }