import json


def pack_message(routing_id, message):
    """ Pack a routing id and Message into a mutlipart zmq message.

    Parameters
    ----------
    routing_id : str
        The zmq socket identity to place first in the message.

    message : Message
        The Message object to serialized into the multipart message.

    """
    multipart = [routing_id]
    dumps = json.dumps
    multipart.extend(dumps(part) for part in message)
    return multipart