lib/utils.js
function deserializeKafkaMessage(kafkaMessage) {
    kafkaMessage.message = objectFactory(kafkaMessage.value);

    kafkaMessage.message._kafka = {
        topic:     kafkaMessage.topic,
        partition: kafkaMessage.partition,
        offset:    kafkaMessage.offset,
        timestamp: kafkaMessage.timestamp || null,
        key:       kafkaMessage.key,
    };

    return kafkaMessage;
}
function deserializeKafkaMessage(kafkaMessage) {
    kafkaMessage.message = objectFactory(kafkaMessage.value);

    kafkaMessage.message._kafka = {
        topic:     kafkaMessage.topic,
        partition: kafkaMessage.partition,
        offset:    kafkaMessage.offset,
        timestamp: kafkaMessage.timestamp || null,
        key:       kafkaMessage.key,
    };

    return kafkaMessage;
}
function deserializeKafkaMessage ( kafkaMessage ) { kafkaMessage . message = objectFactory ( kafkaMessage . value ) ; kafkaMessage . message . _kafka = { topic : kafkaMessage . topic , partition : kafkaMessage . partition , offset : kafkaMessage . offset , timestamp : kafkaMessage . timestamp || null , key : kafkaMessage . key , } ; return kafkaMessage ; }
Parses kafkaMessage.message as a JSON string and then
augments the object with kafka message metadata.
in the message._kafka sub object.

@param  {KafkaMesssage} kafkaMessage
@return {Object}
Parses kafkaMessage . message as a JSON string and then augments the object with kafka message metadata . in the message . _kafka sub object .