title: How to know if message was published to a queue using rabbitmq routing features
body: <p>I've been working on a project which uses rabbitmq to communicate. Recently we discovered that it would be much scalable if we used rabbit routing feature. So basically we bind the queue to several routing keys and use an exchange with type <code>direct</code>.</p>
  
  <p>It's working like publish/subscribe. So it's possible to bind and unbind the queue to different events so consumers/subscribers only receive messages to which they're interested.</p>
  
  <p>Of course, the producer/publisher now uses the binding key (event name) as <code>routing_key</code> to pass it to pika implementation. However, when it publishes something for a binding that doesn't exist the message is lost, i.e. when nobody bound a queue for event <code>foo</code>, but some publisher calls <code>pika.basic_publish(..., routing_key='foo')</code>.</p>
  
  <p><strong>So my question is:</strong> </p>
  
  <p>Is it possible to know if the message was actually published in a queue?</p>
  
  <p><strong>What I've tried:</strong></p>
  
  <ul>
  <li><p>Checking the return value of pika.basic_publish. It always returns <code>None</code>.</p></li>
  <li><p>Check if there's an exception when we try to publish for a binding that doesn't exist. There is none.</p></li>
  <li><p>Having an additional queue to make out of band control (since all subscribers are run by the same process). This approach doesn't feel ideal to me.</p></li>
  </ul>
  
  <p><strong>Additional info</strong></p>
  
  <ul>
  <li><p>Since I'm using this routing feature, the queue names are generated by rabbit. I don't have any problem if the new approach has to name the queue itself.</p></li>
  <li><p>If a new approach is suggested which requires binding to exchanges instead of queues, I would like to hear them, but I would prefer to avoid them as they're not actually AMQP and are an extension implemented by rabbitmq.</p></li>
  <li><p>pika version is 0.9.5</p></li>
  <li><p>rabbitmq version is 2.8</p></li>
  </ul>
  
  <p>Thanks a lot</p>