class_docstr: This publisher will handle failures and closures and will
  attempt to restart things
  
  delivery confirmations are used to track messages that have
  been sent and if they have been confirmed
docstr: Setup the example publisher object, passing in the URL we will use
  to connect to RabbitMQ.
docstr_tok: ["Setup","the","example","publisher","object",",","passing","in","the","URL","we","will","use","to","connect","to","RabbitMQ","."]
code: def __init__(
      self, queue, route, amqp_url="", config=None, logger=None
  ):
      """Setup the example publisher object, passing in the URL we will use
      to connect to RabbitMQ.
      """
      self._rmq_lock = threading.RLock()
      self._connection = None
      self._channel = None
      self._consumer = None
      self._consume_ready = False
  
      self._msg_tracking_lock = threading.RLock()
      self._deliveries = []
      self._acked = 0
      self._nacked = 0
      self._message_number = 0
  
      self._rmq_msg = None
      self._rmq_id = None
  
      self._stopping = False
      self._exchange = "StudioML.topic"
      self._exchange_type = "topic"
      self._routing_key = route
  
      self._url = amqp_url
      self._is_persistent: bool = False
  
      if logger is not None:
          self._logger = logger
      else:
          self._logger = logs.get_logger("RabbitMQ")
          self._logger.setLevel(get_storage_verbose_level())
  
      if config is not None:
          # extract from the config data structure any settings related to
          # queue messaging for rabbit MQ
          if "cloud" in config:
              if "queue" in config["cloud"]:
                  if "rmq" in config["cloud"]["queue"]:
                      self._url = config["cloud"]["queue"]["rmq"]
                      self._logger.warning(
                          "use queue url %s", self._url
                      )
                      flag_persistent = config["cloud"]["queue"].get(
                          "persistent", False
                      )
                      if isinstance(flag_persistent, str):
                          flag_persistent = (
                              flag_persistent.lower() == "true"
                          )
                      self._is_persistent = flag_persistent
  
      self._queue = queue
      self._queue_deleted = True
      self._connection_failed = False
      self._connection_failure_reason = None
  
      # The pika library for RabbitMQ has an asynchronous run method
      # that needs to run forever and will do reconnections etc
      # automatically for us
      thr = threading.Thread(target=self._run, args=(), kwargs={})
      thr.setDaemon(True)
      thr.start()
      self._wait_queue_created(600)
  
imports: import time
  import threading
  import pika
  from studio.storage.storage_setup import get_storage_verbose_level
  from studio.util import logs
label_desc: Use image node_id 1 to create a new RMQueue object  with example: obj = RMQueue(queue, route, amqp_url, config, logger)