You can accomplish this with the console consumer -- it has a formatter
flag that lets you plug in custom logic for formatting messages. The
default does not do any formatting, but if you write your own
implementation, you just need to set the flag to plug it in.
You can see an example of this in
I was wondering, do the kafka consumer shell scripts (high and low level
ones) and kafkacat do any pre-processing of the topic messages before
outputting to stdout or does it just output "as is" in the format the
message originally came in through kafka from the producer?
Meaning pretty printed JS