'Encode a MessageSet. Unlike other arrays in the protocol,
MessageSets are not length-prefixed
Format
MessageSet => [Offset MessageSize Message]
Offset => int64
MessageSize => int32'

@classmethod
def _encode_message_set(cls, messages):

    message_set = []
    for message in messages:
        encoded_message = KafkaProtocol._encode_message(message)
        message_set.append(struct.pack(('>qi%ds' % len(encoded_message)), 0, len(encoded_message), encoded_message))
    return ''.join(message_set)
