Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add output format

...

This led me to propose adding –-property print.topic=true to the kafka-console-consumer  tool.

Printing a message with the "print.topic" set to "true" would produce this output:

Topic:topic    value

Printing a message with these properties:

"print.offset" -> "true"
"print.topic" -> "true"
"print.timestamp" -> "true"
"print.partition" -> "true"
"print.key" -> "true"


produces the following output:

NO_TIMESTAMP    Partition:0    Offset:123    Topic:topic    key    value

Proposed Changes

Adding –property print.topics=true  would print the topic of the message. The topic() accessor already exists in the consumerRecord  object.

...