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: RMQ callback for responses to a Basic.Publish RPC
  command, passing in either a Basic.Ack or Basic.Nack frame with
  the delivery tag of the message that was published. The delivery tag
  is an integer counter indicating the message number that was sent
  on the channel via Basic.Publish. Here we're just doing house keeping
  to keep track of stats and remove message numbers that we expect
  a delivery confirmation of from the list used to keep track of messages
  that are pending confirmation.
  
  :param pika.frame.Method method_frame: Basic.Ack or Basic.Nack frame
docstr_tok: ["RMQ","callback","for","responses","to","a","Basic.Publish","RPC","command",",","passing","in","either","a","Basic.Ack","or","Basic.Nack","frame","with","the","delivery","tag","of","the","message","that","was","published",".","The","delivery","tag","is","an","integer","counter","indicating","the","message","number","that","was","sent","on","the","channel","via","Basic.Publish",".","Here","we","'re","just","doing","house","keeping","to","keep","track","of","stats","and","remove","message","numbers","that","we","expect","a","delivery","confirmation","of","from","the","list","used","to","keep","track","of","messages","that","are","pending","confirmation",".",":","param","pika.frame.Method","method_frame",":","Basic.Ack","or","Basic.Nack","frame"]
code: def _on_delivery_confirmation(self, method_frame):
      """
      RMQ callback for responses to a Basic.Publish RPC
      command, passing in either a Basic.Ack or Basic.Nack frame with
      the delivery tag of the message that was published. The delivery tag
      is an integer counter indicating the message number that was sent
      on the channel via Basic.Publish. Here we're just doing house keeping
      to keep track of stats and remove message numbers that we expect
      a delivery confirmation of from the list used to keep track of messages
      that are pending confirmation.
  
      :param pika.frame.Method method_frame: Basic.Ack or Basic.Nack frame
  
      """
      confirmation_type = method_frame.method.NAME.split(".")[1].lower()
      self._logger.debug(
          "received %s for delivery tag: %s",
          confirmation_type,
          str(method_frame.method.delivery_tag),
      )
  
      with self._msg_tracking_lock:
          if confirmation_type == "ack":
              self._acked += 1
          elif confirmation_type == "nack":
              self._nacked += 1
          self._deliveries.remove(method_frame.method.delivery_tag)
          self._logger.info(
              "published %s messages, %s have yet to be confirmed,"
              " %s were acked and %s were nacked",
              str(self._message_number),
              str(len(self._deliveries)),
              str(self._acked),
              str(self._nacked),
          )
  
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 22 for calling the RMQueue obj's underlying member method code with example usage: obj._on_delivery_confirmation(method_frame) without return types