Franck Revel (FranckAF)
Air France

Air France
FranckAF Member since 2015 3 posts
Air France
Posted: May 10, 2021
Last activity: May 10, 2021
Posted: 10 May 2021 3:08 EDT
Last activity: 10 May 2021 7:54 EDT

How Add a Kafka appender in prlog4j2.xml for PEGA 8.4.3


I'm trying to add a Kafka appender in prlog4j2.xml but it results in a Java exception:

2021-05-06 07:49:08,434 main ERROR There was a problem initializing the LoggerContext using configuration file:XXXXXXXXXXXX/prlog4j2.xml org.apache.kafka.common.config.ConfigException: Invalid value org.apache.kafka.common.serialization.ByteArraySerializer for configuration key.serializer: Class org.apache.kafka.common.serialization.ByteArraySerializer could not be found. at org.apache.kafka.common.config.ConfigDef.parseType( at org.apache.kafka.common.config.ConfigDef.parseValue( at org.apache.kafka.common.config.ConfigDef.parse(


What I did so far: 

  •   Import kafka-log4j-appender-1.1.1.jar via Application->Distribution->Import (I kept all default values during Import)
  •   Modify prlog4j2.xml to add this extra kafka appender
  •   Restart server

I checked in pr_engineclasses table and both kafka-log4j-appender-1.1.1 and kafka-client-1.1.1 are available.

Modification in prlog4j2.xml are as follow:

  • In Appenders part:    

    <Kafka name="KafkaAppender" topic="C1.log-MYTOPIC.001">         <Property name="bootstrap.servers">server1:yyyyy,,,</Property>         </Kafka>

  • In Loggers/asyncRoot part:

            <AppenderRef ref="KafkaAppender" level="INFO"/>  

Could anyone help me in finding why I can not use this Kafka appender ? 

Thanks !




***Edited by Moderator: Pooja Gadige to add platform capability tags***
Pega Platform 8.4.3 Decision Management Low-Code App Development