def publish(data_type, stream_id, name, publishing_type):
    """
    Construct a 'publish' message to send publish information to start a broadcast.
    :param data_type: int the RTMP datatype.
    :param stream_id: int the stream which the message will be sent on (received from createStream).
    :param name: str the name of the stream to publish on the server.
    :param publishing_type: str the type of publishing method i.e. 'live'/'record'/'append'.
    """
    msg = {'msg': data_type,
           'stream_id': stream_id,
           'command': [u'publish', 0, None, u'' + str(name), u'' + publishing_type]}
    return msg