# File lib/amq/client/async/queue.rb, line 186
        def bind(exchange, routing_key = AMQ::Protocol::EMPTY_STRING, nowait = false, arguments = nil, &block)
          nowait = true unless block
          exchange_name = if exchange.respond_to?(:name)
                            exchange.name
                          else

                            exchange
                          end

          @connection.send_frame(Protocol::Queue::Bind.encode(@channel.id, @name, exchange_name, routing_key, nowait, arguments))

          if !nowait
            self.append_callback(:bind, &block)
            @channel.queues_awaiting_bind_ok.push(self)
          end

          # store bindings for automatic recovery, but BE VERY CAREFUL to
          # not cause an infinite rebinding loop here when we recover. MK.
          binding = { :exchange => exchange_name, :routing_key => routing_key, :arguments => arguments }
          @bindings.push(binding) unless @bindings.include?(binding)

          self
        end