Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

partition
PropertyValid ValuesDefault ValueDescription
print.offset"true" or "false""false"print message offset
print."true" or "false""false"print message partitionprint.headers"true" or "false""false"print headers
header.separatorstring","separator printed between each header's key:value pair
headers.deserializerclass name"StringDeserializer"header value deserializer
null.literalstring"" (i.e. empty string)null"literal to print if the value is NULL (size -1)


Example output:

Code Block
$ kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning --property print.partition=true --property print.key=true --property print.timestamp=true --property print.offset=true --property print.headers --property key.separator='|'

CreateTime:1592475472398|null|asdf|0|3|h1=v1,h2=v2

CreateTime:1592475472456|null|qwer|0|4|NO_HEADER



Proposed Changes

Add new properties to DefaultMessageFormatter as per the above:

...