code: def _add_to_publish_stack(self, exchange, routing_key, message, properties):
          
          global message_stack
          message_stack.append((exchange, routing_key, message, properties))
docs: Temporarily add the message to the stack to publish to RabbitMQ
  
          :param str exchange: The exchange to publish to
          :param str routing_key: The routing key to publish with
          :param str message: The message body
          :param pika.BasicProperties: The message properties