Kafka Producer and Consumer API Enhancements
Multi-Threaded Messaging with the Apache Kafka Consumer

Multi-Threaded Messaging with the Apache Kafka Consumer

8/13/2020 · Igor Buzatović

What this post added

This post introduces a multi-threaded Kafka consumer architecture for Java applications. It details a design that decouples record consumption from processing by using a thread pool to execute tasks for processing records grouped by partition. The post elaborates on the challenges of the single-threaded consumer model, such as `max.poll.interval.ms` timeouts and complex exception handling, and proposes a multi-threaded approach to address these by allowing for longer processing times and simpler retry logic. It emphasizes the importance of maintaining at-least-once delivery semantics and processing order guarantees per partition, and discusses strategies for handling consumer group rebalancing in a multi-threaded context.

Read the original post ↗