Routing Java Logs and Business Events to Azure Event Hubs using the Kafka logging appender
Azure Event Hubs implement a Kafka compatible API. This means we can migrate an application from Kafka to Azure EventHubs with minor changes. Retargeting basic Kafka traffic from Kafka to Event Hubs can be just a couple of 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 in the Event=Hubs-Sink branch https://github.com/freemansoft/spring-boot-log-to-kafka-example/tree/feature/Event-Hubs-Sink Video See the video for a longer explanation. Create Azure Resources We created an Azure Event Hubs Namespace and two individual hubs called logs and audit env.properties We can isolate our endpoint configurations in environment-specific properties files. The def...