OGG Adapter for Kafka - Is that possible to "Trace" or "Print" the actual messages published in Kafka to the Logs?

(Doc ID 2353357.1)

Last updated on FEBRUARY 12, 2018

Applies to:

Oracle GoldenGate - Version 12.1.2.1.0 and later
Information in this document applies to any platform.

Goal

Is that possible to "Trace" or "Print" the actual messages published in Kafka to the Logs?

how can we print actual message published to the Logs?

11:03:07,767 DEBUG UserExitDataSource:727 - == JNI == createColumnValue()
11:03:07,767 DEBUG UserExitDataSource:1038 - == JNI == createOperation(SCOTT.EMPLOYEE, 5, 8, 16560462, 8, 16560624, 3, [B@5ce1ac8f, [B@128f2529)
11:03:07,767 DEBUG KafkaHandler:416 - Process operation: table=[SCOTT.EMPLOYEE], op pos=00000000080016560462, tx pos=00000000080016560301, op ts=2017-12-28 21:27:18.023561
11:03:07,767 DEBUG KafkaHandler:468 - Creating the producer record and sending to Kafka topic [com.dev.19688-GGKafkaNativeIntegrationDTI1-v1] using partition key [1]. Message size [212].
11:03:07,767 DEBUG NonBlockingKafkaProducer:41 - Sending producer record to Non Blocking Kafka Producer
11:03:07,767 DEBUG NonBlockingKafkaProducer:51 - NBKP:send(): Returning status: OK

****************************************************************************************************************************************************************************************************

Below is the properties file.,

gg.handlerlist=kafkahandler
gg.handler.kafkahandler.type=kafka
gg.handler.kafkahandler.KafkaProducerConfigFile=custom_kafka_producer.properties
gg.handler.kafkahandler.topicMappingTemplate=com.dev.19688-GGKafkaNativeIntegrationDTI3-v1
gg.handler.kafkahandler.keyMappingTemplate=${primaryKeys}
gg.handler.kafkahandler.format=json
gg.handler.kafkahandler.BlockingSend=false
gg.handler.kafkahandler.includeTokens=true
gg.handler.kafkahandler.mode=op

goldengate.userexit.timestamp=utc
goldengate.userexit.writers=javawriter
javawriter.stats.display=TRUE
javawriter.stats.full=TRUE
gg.log=log4j
gg.log.level=DEBUG
gg.report.time=30sec
gg.classpath=mylib/kafka_2.12-0.11.0.1.jar:mylib/kafka-clients-0.11.0.1.jar

javawriter.bootoptions=-Xmx512m -Xms32m -Djava.class.path=ggjava/ggjava.jar:config/log4j.properties:mylib/apache-log4j-extras-1.2.17.jar -Djava.security.auth.login.config=config/kafka_pub_jaas.conf -Dlog4j.configuration=file:config/log4j.properties

The main requirement is, the actual messages published get written to the Logs. Is this achievable?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms