def bind(exchange, opts = {})
      check_queue_deleted!

      if exchange.respond_to?(:add_route)

        # we can do the binding ourselves
        exchange.add_route opts.fetch(:routing_key, @name), self
      else

        # we need the channel to lookup the exchange
        @channel.queue_bind self, opts.fetch(:routing_key, @name), exchange
      end
      self
    end
def bind(exchange, opts = {})
      check_queue_deleted!

      if exchange.respond_to?(:add_route)

        # we can do the binding ourselves
        exchange.add_route opts.fetch(:routing_key, @name), self
      else

        # we need the channel to lookup the exchange
        @channel.queue_bind self, opts.fetch(:routing_key, @name), exchange
      end
      self
    end
Bind this queue to an exchange

 @param [BunnyMock::Exchange,String] exchange Exchange to bind to
 @param [Hash] opts Binding properties

 @option opts [String] :routing_key Custom routing key

 @api public