<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to fix garbled characters received in Kafka Audit Log Listener in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-fix-garbled-characters-received-in-kafka-audit-log/m-p/317787#M4788</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1891iDE4DAF97D33A7519/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image" alt="Image" /&gt;&lt;/span&gt;
We have setup Kafka as audit log listener and we are seeing the logs. Following is the way we have configured&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Wrote extension point with target: org.nuxeo.runtime.stream.kafka.service point: kafkaConfig&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;component name="com.softcell.kafka.contrib.kafkacontrib"&amp;gt;

  &amp;lt;extension target="org.nuxeo.runtime.stream.kafka.service" point="kafkaConfig"&amp;gt;
    &amp;lt;kafkaConfig name="default" topicPrefix="nuxeo-"&amp;gt;
      &amp;lt;producer&amp;gt;
        &amp;lt;property name="bootstrap.servers"&amp;gt;localhost:9092&amp;lt;/property&amp;gt;
      &amp;lt;/producer&amp;gt;
      &amp;lt;consumer&amp;gt;
        &amp;lt;property name="bootstrap.servers"&amp;gt;localhost:9092&amp;lt;/property&amp;gt;
        &amp;lt;property name="request.timeout.ms"&amp;gt;65000&amp;lt;/property&amp;gt;
        &amp;lt;property name="max.poll.interval.ms"&amp;gt;60000&amp;lt;/property&amp;gt;
        &amp;lt;property name="session.timeout.ms"&amp;gt;20000&amp;lt;/property&amp;gt;
        &amp;lt;property name="heartbeat.interval.ms"&amp;gt;1000&amp;lt;/property&amp;gt;
        &amp;lt;property name="max.poll.records"&amp;gt;50&amp;lt;/property&amp;gt;
      &amp;lt;/consumer&amp;gt;
    &amp;lt;/kafkaConfig&amp;gt;
  &amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Added following config to this contributions nuxeo.defaults:&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE&gt;#kafkacontrib.target=
kafka.enabled=true
nuxeo.template.includes=common
nuxeo.stream.audit.enabled=true
nuxeo.stream.audit.log.config=audit
nuxeo.stream.audit.batch.size=25
nuxeo.stream.audit.batch.threshold.ms=500
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After doing this, I start listening to topic nuxeo-audit using consoleConsumer using this command:
&lt;CODE&gt;bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic nuxeo-audit&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I can see the logs getting generated. However there are garbled characters in them. Pasting a sample below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="kafka-screenshot.png"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1889iDE9553F9275F2F3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="kafka-screenshot.png" alt="kafka-screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can see in the &lt;A href="https://github.com/nuxeo/nuxeo/blob/master/nuxeo-runtime/nuxeo-stream/src/main/java/org/nuxeo/lib/stream/log/kafka/KafkaLogManager.java"&gt;source-code&lt;/A&gt; that BytesDeserializer is being used for value but I am not sure why am I seeing garbled characters. Any help in this would be deeply appreciated. Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2019 10:30:32 GMT</pubDate>
    <dc:creator>Varun_Singh</dc:creator>
    <dc:date>2019-07-10T10:30:32Z</dc:date>
    <item>
      <title>How to fix garbled characters received in Kafka Audit Log Listener</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-fix-garbled-characters-received-in-kafka-audit-log/m-p/317787#M4788</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1891iDE4DAF97D33A7519/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image" alt="Image" /&gt;&lt;/span&gt;
We have setup Kafka as audit log listener and we are seeing the logs. Following is the way we have configured&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Wrote extension point with target: org.nuxeo.runtime.stream.kafka.service point: kafkaConfig&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;component name="com.softcell.kafka.contrib.kafkacontrib"&amp;gt;

  &amp;lt;extension target="org.nuxeo.runtime.stream.kafka.service" point="kafkaConfig"&amp;gt;
    &amp;lt;kafkaConfig name="default" topicPrefix="nuxeo-"&amp;gt;
      &amp;lt;producer&amp;gt;
        &amp;lt;property name="bootstrap.servers"&amp;gt;localhost:9092&amp;lt;/property&amp;gt;
      &amp;lt;/producer&amp;gt;
      &amp;lt;consumer&amp;gt;
        &amp;lt;property name="bootstrap.servers"&amp;gt;localhost:9092&amp;lt;/property&amp;gt;
        &amp;lt;property name="request.timeout.ms"&amp;gt;65000&amp;lt;/property&amp;gt;
        &amp;lt;property name="max.poll.interval.ms"&amp;gt;60000&amp;lt;/property&amp;gt;
        &amp;lt;property name="session.timeout.ms"&amp;gt;20000&amp;lt;/property&amp;gt;
        &amp;lt;property name="heartbeat.interval.ms"&amp;gt;1000&amp;lt;/property&amp;gt;
        &amp;lt;property name="max.poll.records"&amp;gt;50&amp;lt;/property&amp;gt;
      &amp;lt;/consumer&amp;gt;
    &amp;lt;/kafkaConfig&amp;gt;
  &amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Added following config to this contributions nuxeo.defaults:&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE&gt;#kafkacontrib.target=
kafka.enabled=true
nuxeo.template.includes=common
nuxeo.stream.audit.enabled=true
nuxeo.stream.audit.log.config=audit
nuxeo.stream.audit.batch.size=25
nuxeo.stream.audit.batch.threshold.ms=500
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After doing this, I start listening to topic nuxeo-audit using consoleConsumer using this command:
&lt;CODE&gt;bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic nuxeo-audit&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I can see the logs getting generated. However there are garbled characters in them. Pasting a sample below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="kafka-screenshot.png"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1889iDE9553F9275F2F3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="kafka-screenshot.png" alt="kafka-screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can see in the &lt;A href="https://github.com/nuxeo/nuxeo/blob/master/nuxeo-runtime/nuxeo-stream/src/main/java/org/nuxeo/lib/stream/log/kafka/KafkaLogManager.java"&gt;source-code&lt;/A&gt; that BytesDeserializer is being used for value but I am not sure why am I seeing garbled characters. Any help in this would be deeply appreciated. Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 10:30:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-fix-garbled-characters-received-in-kafka-audit-log/m-p/317787#M4788</guid>
      <dc:creator>Varun_Singh</dc:creator>
      <dc:date>2019-07-10T10:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix garbled characters received in Kafka Audit Log Listener</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-fix-garbled-characters-received-in-kafka-audit-log/m-p/317788#M4789</link>
      <description>&lt;P&gt;I think you need to add this to nuxeo.conf&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 19:16:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-fix-garbled-characters-received-in-kafka-audit-log/m-p/317788#M4789</guid>
      <dc:creator>LaraGranite_</dc:creator>
      <dc:date>2019-07-10T19:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix garbled characters received in Kafka Audit Log Listener</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-fix-garbled-characters-received-in-kafka-audit-log/m-p/317789#M4790</link>
      <description>&lt;P&gt;Thanks for your inputs LaraGranite. I added the codec config like you mentioned but didn't see any changes. I can see that there are a few more codecs available. I will try them and will post the findings here.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 05:08:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-fix-garbled-characters-received-in-kafka-audit-log/m-p/317789#M4790</guid>
      <dc:creator>Varun_Singh</dc:creator>
      <dc:date>2019-07-12T05:08:09Z</dc:date>
    </item>
  </channel>
</rss>

