Hi Ismael,

Thanks for your questions. Answers below.

1. It would be helpful to see an example of the output with everything
enabled.

For consumer record:

new ConsumerRecord[Array[Byte], Array[Byte]](

  "someTopic",

  partition = 9,

  offset = 9876,

  timestamp = 123,

  timestampType = TimestampType.CREATE_TIME,

  checksum = 0L,

  serializedKeySize = 0,

  serializedValueSize = 0,

  key = "someKey",

  value = "someValue",

  new RecordHeaders(Seq(header("h1", "v1"), header("h2", "v2")).asJava)

)

and everything enabled:

Map("print.key" -> "true",

  "print.timestamp" -> "true",

  "print.partition" -> "true",

  "print.offset" -> "true",

  "print.headers" -> "true",

  "print.value" -> "true"),

The output would be:

"CreateTime:1234 someKey 9876 9 h1:v1,h2:v2 someValue
"


2. What are the default values for the properties (eg what's the default
header separator).

printTimestamp = false

printKey = false

printOffset = false

printPartition = false

printHeaders = false

printValue = true

keySeparator = "\t"

headersSeparator = ","

lineSeparator = "\n"


3. What is the separator used between key/value and the new fields?

There is no additional separator. keySeparator is used for separating key,
value and any new fields.
It is backward compatible behavior. keySeparator - separate key from
anything else.


Regards,
Mateusz Zakarczemny


pt., 12 kwi 2019 o 22:47 Ismael Juma <ism...@juma.me.uk> napisaƂ(a):

> Hi Mateusz,
>
> The KIP looks good. Just a few of questions/suggestions:
>
> 1. It would be helpful to see an example of the output with everything
> enabled.
> 2. What are the default values for the properties (eg what's the default
> header separator).
> 3. What is the separator used between key/value and the new fields?
>
> Ismael
>
> On Fri, Apr 12, 2019 at 9:43 PM Mateusz Zakarczemny <
> m.zakarcze...@gmail.com>
> wrote:
>
> > Hi All,
> > This KIP is in discussion for more than a month. The feedback is positive
> > without any objection comments. Therefore, I would like to start voting.
> >
> >
> >
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-431%3A+Support+of+printing+additional+ConsumerRecord+fields+in+DefaultMessageFormatter
> >
> > Regards,
> > Mateusz Zakarczemny
> >
>

Reply via email to