def process_amqp_msgs(self):

        LOG.info(_LI('Starting process_amqp_msgs...'))
        while True:
            (mtd_fr, hdr_fr, body) = (None, None, None)
            try:
                if self.consume_channel:
                    (mtd_fr, hdr_fr, body) = self.consume_channel.basic_get(
                        self._dcnm_queue_name)
                if mtd_fr:
                    # Queue has messages.
                    LOG.info(_LI('RX message: %s'), body)
                    self._cb_dcnm_msg(mtd_fr, body)
                    self.consume_channel.basic_ack(mtd_fr.delivery_tag)
                else:
                    # Queue is empty.
                    try:
                        self._conn.sleep(1)
                    except AttributeError:
                        time.sleep(1)
            except Exception:
                exc_type, exc_value, exc_tb = sys.exc_info()
                tb_str = traceback.format_exception(exc_type,
                                                    exc_value, exc_tb)
                LOG.exception(_LE("Failed to read from queue: %(queue)s "
                              "%(exc_type)s, %(exc_value)s, %(exc_tb)s."), {
                                  'queue': self._dcnm_queue_name,
                                  'exc_type': exc_type,
                                  'exc_value': exc_value,
                                  'exc_tb': tb_str})
Converts an old logging record into a logbook log record.
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/server/dfa_listen_dcnm.py/DCNMListener.process_amqp_msgs--crossover with--dataset/ETHPy150Open getlogbook/logbook/logbook/compat.py/RedirectLoggingHandler.convert_record