'Encode a ConsumerMetadataRequest
Arguments:
client_id: string
correlation_id: int
payloads: string (consumer group)'

@classmethod
def encode_consumer_metadata_request(cls, client_id, correlation_id, payloads):

    message = []
    message.append(cls._encode_message_header(client_id, correlation_id, KafkaProtocol.CONSUMER_METADATA_KEY))
    message.append(struct.pack(('>h%ds' % len(payloads)), len(payloads), payloads))
    msg = ''.join(message)
    return write_int_string(msg)
