title: Exchange name in Pika exchange_declare callback
body: <p>I try to use the exchange name in my <code>exchange_declare</code> callback. I use the <code>SelectConnection</code> adapter for asynchronous requests in Pika.</p>
  
  <p>My idea is to first build lists of exchanges, queues and bindings in my program. I then dispatch multiple exchange and queue declarations to Pika, and create bindings as soon as the needed queues and exchanges for each binding have got their DeclareOK messages.</p>
  
  <p>This means I need to know the names of exchanges and queues in my callbacks so that I can correlate them with the bindings to create.</p>
  
  <p>Something like this:</p>
  
  <pre><code>print "Create A"
  channel.exchange_declare(callback=on_exchange, exchange="exchangeA")
  print "Create B"
  channel.exchange_declare(callback=on_exchange, exchange="exchangeB")
  
  def on_exchange(response):
    # How do I know if this was exchangeA or exchangeB ?
    print "Exchange declared"
    print response
  </code></pre>
  
  <p>This gives the following output, which clearly shows that the exchanges are declared first and callbacks triggered later (as expected):</p>
  
  <pre><code>Create A
  Create B
  Exchange declared
  &lt;METHOD(['method=&lt;Exchange.DeclareOk&gt;', 'channel_number=1', 'frame_type=1'])&gt;
  Exchange declared
  &lt;METHOD(['method=&lt;Exchange.DeclareOk&gt;', 'channel_number=1', 'frame_type=1'])&gt;
  </code></pre>
  
  <p>I have figured out that <code>response</code> is of type <a href="https://pika.readthedocs.org/en/0.9.12/_modules/pika/frame.html" rel="nofollow">pika.frame.Method</a> but how do I go from there? Are the exchanges perhaps guaranteed to be declared in order?</p>