azure-servicebus/azure/servicebus/common/mixins.py
def queue_message(self, message):
        """Queue a message to be sent later.

        This operation should be followed up with send_pending_messages.

        :param message: The message to be sent.
        :type message: ~azure.servicebus.common.message.Message

        Example:
            .. literalinclude:: ../examples/test_examples.py
                :start-after: [START queue_and_send_messages]
                :end-before: [END queue_and_send_messages]
                :language: python
                :dedent: 4
                :caption: Send the queued messages
                :name: sender_queue

        """
        if not self.running:
            self.open()
        if self.session_id and not message.properties.group_id:
            message.properties.group_id = self.session_id
        self._handler.queue_message(message.message)
def queue_message(self, message):
        """Queue a message to be sent later.

        This operation should be followed up with send_pending_messages.

        :param message: The message to be sent.
        :type message: ~azure.servicebus.common.message.Message

        Example:
            .. literalinclude:: ../examples/test_examples.py
                :start-after: [START queue_and_send_messages]
                :end-before: [END queue_and_send_messages]
                :language: python
                :dedent: 4
                :caption: Send the queued messages
                :name: sender_queue

        """
        if not self.running:
            self.open()
        if self.session_id and not message.properties.group_id:
            message.properties.group_id = self.session_id
        self._handler.queue_message(message.message)
Queue a message to be sent later.

        This operation should be followed up with send_pending_messages.

        :param message: The message to be sent.
        :type message: ~azure.servicebus.common.message.Message

        Example:
            .. literalinclude:: ../examples/test_examples.py
                :start-after: [START queue_and_send_messages]
                :end-before: [END queue_and_send_messages]
                :language: python
                :dedent: 4
                :caption: Send the queued messages
                :name: sender_queue