Send Raw Json to Kafka Topic in Java

I’m tring to send json-string to Kafka topic, using Java.
There are many similar threads out there such as:

Context

  • I’ve tried JsonSerializer
  • I’ve tried Custom Serializer that pretty much mimics what OOB JsonSerializer does
  • I’m able to publish successfully to Kafka topic without any issue.

But what I’m seeing in the Kafka topic is the following (through lenses):

VALUE:"{"theKey":"theValue"}"

Expectation is:

VALUE:{"theKey":"theValue"}

Any thoughts?

Read more here: Source link