Java logs to Azure Event Hubs using Kafka Appender

Опубликовано: 01 Октябрь 2024
на канале: Joe Freeman: Software Craft, Org Stuff, Tech Stuff
943
5

Azure Event Hubs have a Kafka compatible API. Retargeting basic Kafka traffic from Kafka to Event Hubs can be just a couple configuration changes.

The sample program sent its logs to Kafka via the Log4J Kafka Appender. It takes just 4 lines of changes in the log4j2.xml configuration file to send the logs to Azure EventHubs instead.

You can find the sample program on GitHub at https://github.com/freemansoft/spring...
The blog article is at http://joe.blog.freemansoft.com/2022/...

A previous blog and the associated video discusses sending Java logs to Kafka via the Appender http://joe.blog.freemansoft.com/2020/...
Routing Logs and audit to Kafka via Logging Appenders    • Java Logs and Audit to Kafka via Logging  
Viewing Logs and audit in Kafka via Streams and KSQL    • Java Logs and Audit to Kafka viewing ...