'Prepare message data for sending.
This message is typically called by
:meth:`kombu.messaging.Producer._publish` as a preparation step in
message publication.
:param body: The body of the message
:type body: str
:keyword priority: A number between 0 and 9 that sets the priority of
the message.
:type priority: int
:keyword content_type: The content_type the message body should be
treated as. If this is unset, the
:class:`qpid.messaging.endpoints.Sender` object tries to
autodetect the content_type from the body.
:type content_type: str
:keyword content_encoding: The content_encoding the message body is
encoded as.
:type content_encoding: str
:keyword headers: Additional Message headers that should be set.
Passed in as a key-value pair.
:type headers: dict
:keyword properties: Message properties to be set on the message.
:type properties: dict
:return: Returns a dict object that encapsulates message
attributes. See parameters for more details on attributes that
can be set.
:rtype: dict'

def prepare_message(self, body, priority=None, content_type=None, content_encoding=None, headers=None, properties=None):

    properties = (properties or {})
    info = properties.setdefault(u'delivery_info', {})
    info[u'priority'] = (priority or 0)
    return {u'body': body, u'content-encoding': content_encoding, u'content-type': content_type, u'headers': (headers or {}), u'properties': (properties or {})}
