import json


def dict_to_masstransit_message(message_type, message_body_dict):
    """
    Method for convert dict with 'message' body and message_type value
    to MT readable format

    :param message_type: message_type value, need for MT body
    :param message_body_dict: dict with data of 'message' for MT
    :return: MT body, ready for transfer
    """

    # fix formatting and tranform dict to bytes
    masstransit_message = json.dumps({
        'messageType': [message_type],
        'message': message_body_dict,
    })

    return masstransit_message