code: def queue_exists(self, queue):
          
          try:
              self.channel.queue_declare(queue=queue, passive=True)
          except AMQPChannelException, e:
              if e.amqp_reply_code == 404:
                  return False
              raise e
          else:
              return True
docs: Check if a queue has been declared.
  
          :rtype bool: