Main Content
Publish Subscribe Patterns Supporting Enhancing Microservices
Author: Taty Kees Petran Toukam
Supervisors: Prof. Dr. Boris Koldehofe, Bastian Blumentritt, M.Sc. Mehran Salmani
Format: Bachelor's thesis, TU Ilmenau
Modern microservice architectures rely on publish/subscribe (Pub/Sub) middleware to achieve scalable and decoupled communication between distributed services. However, the performance and scalability of such systems depend heavily on how topics are partitioned and how consumers are assigned to those partitions. This thesis investigates how these algorithmic design choices—specifically topic partitioning and consumer group assignment strategies—affect throughput, latency, and overall system efficiency in Apache Kafka. A reproducible experimental framework was implemented using Docker-based deployment of Kafka, Prometheus, PostgreSQL, and microservice applications. Three Kafka brokers operated in KRaft mode across independent servers, each paired with a high-throughput Gateway producer optimized for minimal latency. Metrics were collected via Prometheus queries over synchronized time windows to measure steady-state performance. The experimental analysis focused on the roundrobin partition assignment strategy, while the range, sticky, and cooperative-sticky strategies were examined algorithmically. Empirical tests showed a sustainable producer throughput of approximately 1,500 rows per second and a consumer capacity of about 1,400 messages per second per partition. These results validated the theoretical scaling relation min_partitions = max(T/P, T/C), indicating that total throughput scales almost linearly with the number of partitions until bounded by producer or consumer limits. The findings confirm that partition assignment algorithms significantly influence throughput predictability and latency stability in distributed Pub/Sub systems. The developed framework provides a reproducible foundation for evaluating messaging performance and supports future research on adaptive and learning-based coordination in cloud-native streaming environments.
Completeted: 24.10.2025
References: https://bibliographie.tu-ilmenau.de/servlets/DozBibEntryServlet?mode=show&id=ilm_mods_00079686