title: how to fetch string messages from raw buffer objects Kafka java
body: <p>There is a nodejs Kafka producer which send the file content to Kafka. When Kafka consumer consumed the messages from Kafka it looks like -</p>
  
  <pre><code>{"type":"Buffer","data":[91,13 .....]
  </code></pre>
  
  <p>When I used <code>m.message.value.toString('utf8')</code> in nodejs Kafka consumer, it print the actual message. But I need to consume in java Kafka consumer. I tried with  <code>property.put("value.serializer.encoding", "utf8")</code> and <code>new String(consumerRecord.value())</code> but still print {<code>"type":"Buffer","data":[91,13 .....]</code>. My question is how to consume message in string format in java which is produced by nodejs Kafka producer.</p>