Published 23-03-2026
Keywords
- Microservices, Database Auditing, Apache Kafka, Hibernate, Event-Driven Architecture, Observability.

This work is licensed under a Creative Commons Attribution 4.0 International License.
How to Cite
Abstract
In distributed microservice architectures, maintaining a consistent and domain-aware audit trail is challenged by database isolation and the trade-offs between context capture and system performance. This paper proposes a hybrid auditing framework that integrates Hibernate event listeners with an Apache Kafka-based asynchronous transport layer. By capturing change events at the application layer, the system preserves critical domain context—such as user identity and localized field labels—while ensuring horizontal scalability and non-blocking performance. Empirical evaluations demonstrate that the framework handles 50,000 events per minute with sub-500ms latency, offering a production-ready solution for high-integrity enterprise environments. The framework was successfully validated through a real-world deployment in a utility billing system, where it processed over 125,000 change events with 100% correctness.
References
- 1. Amir-Mohammadian, S., & Yousefi Zowj, A. (2021). Towards Concurrent Audit Logging in Microservices. In 2021 IEEE 45th Annual Computers, Software, and Applications Conference (COMPSAC) (pp. 1357-1362). IEEE.
- 2. Barabanov, A., et al. (2021). Security Audit Logging in Microservice-Based Systems: Survey of Architecture Patterns. 2021 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), pp. 605-609. IEEE.
- 3. Kleppmann, M. (2017). Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems. O'Reilly Media.
- 4. Richardson, C. (2019). Microservices Patterns: With Examples in Java. Shelter Island, NY: Manning Publications.
- 5. Tahir, A., & Hussain, F. (2022). Design and Implementation of a Generic Audit Logging Framework for Java-Based Microservices. International Journal of Computer Science and Software Engineering, 12(3), 42–50.