def send_amqp_message_template(self):

        """ 
        Default handler for sending AMQP messages from the simulation file
        """
        
        results             = build_dict("FAILED", "No Messages Sent", {
                                        "TotalMessages" : "0"
                                    })

        try:

            # For Now Overrride the Message ID:
            self.m_cur_message["MessageID"] = str(self.m_message_number) + "-" + str(build_unique_key())
            properties                      = None
            self.m_message_number           += 1
            try:
                properties              = self.convert_cur_message_dict_to_basic_properties(self.m_cur_message, self.m_message_number, cur_message_id=None, cur_app_id=None)

            except Exception,e:
                properties              = None
                err_msg                 = "Failed to Convert(" + str(self.m_message_number) + ") Message(" + str(self.m_cur_message) + ") with Ex(" + str(e) + ")"
                self.elg(err_msg, True)
            # end of try/ex

            if properties != None:

                if self.m_cur_message["Exchange"]  != "":
                    if self.m_debug:
                        self.lg("Publish(" + str(self.m_message_number) + ") Ex(" + str(self.m_cur_message["Exchange"]) + ") RoutingKey(" + str(self.m_cur_message["RoutingKey"]) + ")", 6)
                    else:
                        if self.m_message_number % 5000 == 0:
                            self.lg("Publish(" + str(self.m_message_number) + ") Ex(" + str(self.m_cur_message["Exchange"]) + ") RoutingKey(" + str(self.m_cur_message["RoutingKey"]) + ")", 6)

                    self.m_channel.basic_publish(exchange=self.m_cur_message["Exchange"],
                                                    routing_key=self.m_cur_message["RoutingKey"],
                                                    body=json.dumps(self.m_cur_message["Body"], ensure_ascii=False),
                                                    properties=properties)

                elif self.m_cur_message["Queue"]   != "":
                    if self.m_debug:
                        self.lg("Publish(" + str(self.m_message_number) + ") Queue(" + str(self.m_cur_message["Queue"]) +") RoutingKey(" + str(self.m_cur_message["RoutingKey"]) + ")", 6)
                    else:
                        if self.m_message_number % 5000 == 0:
                            self.lg("Publish(" + str(self.m_message_number) + ") Queue(" + str(self.m_cur_message["Queue"]) +") RoutingKey(" + str(self.m_cur_message["RoutingKey"]) + ")", 6)

                    self.m_channel.basic_publish(queue=self.m_cur_message["Queue"],
                                                body=json.dumps(self.m_cur_message["Body"], ensure_ascii=False),
                                                properties=properties)
                else:
                    self.lg("ERROR: Missing an Exchange and Queue for MessageNumber(" + str(self.m_message_number-1) + ") Message(" + str(json.dumps(curr_message)) + ")", 0)

                self.m_deliveries.append(self.m_message_number)
                self.m_sent_messages[self.m_cur_message["MessageID"]]  = self.m_cur_message

                if self.m_num_amqp_msgs < 500 or self.m_message_number % 5000 == 0:
                    self.lg("Published message(" + str(self.m_message_number) + ")", 6)
            # stop if properties != None:

            # end of sending message

            
            results         = build_dict("SUCCESS", "", {
                                        "TotalMessages"     : str(self.m_message_number)
                            })
            

            # Now check the counts:
            self.m_cur_count    += 1

            if self.m_cur_count < self.m_number_to_send:
                self.continue_sending_batch()

        except Exception,k:
            err_msg         = "Failed Send AMQP Message Template Number(" / str(self.m_message_number) + ") Message(" + str(self.m_cur_message) + ") with Ex(" + str(k) + ")"
            self.elg(err_msg, True)
            results         = build_dict("FAILED", str(err_msg), {
                                        "TotalMessages"     : str(self.m_message_number)
                            })
        # end of try/ex

        return results
    # end of send_amqp_message_template
dataset/ETHPy150Open GetLevvel/message-simulator/src/rabbit_message_publisher.py/RabbitMessagePublisher.send_amqp_message_template/operator `+` -> `/`