← back esc

Parallel Consumer

Active · 2 min read
Contents · 5
astubbs/parallel-consumer Java ★ 0 ☍ 1

Shields.io variant (for comparison):

astubbs/parallel-consumer Stars Forks Language

What it is

A parallel Apache Kafka consumer that processes multiple messages concurrently from a single consumer instance. Higher throughput and lower latency than traditional partition-based parallelism.

How it works

Traditional Kafka consumers process messages one partition at a time — if you want more parallelism, you add more partitions. Parallel Consumer flips this: one consumer instance processes many messages in parallel, while preserving ordering where it matters (by key, by partition, or not at all depending on your needs).

var options = ParallelConsumerOptions.<String, String>builder()
    .ordering(KEY)
    .maxConcurrency(1000)
    .consumer(kafkaConsumer)
    .build();

var pc = ParallelStreamProcessor.createEosStreamProcessor(options);
pc.poll(record -> processRecord(record));

The talk

Kafka Summit Europe 2021

Watch the Kafka Summit Europe 2021 presentation where I introduced this as Confluent Labs Parallel Consumer Client.

Timeline

Repositories

The project’s active home — carrying it forward as a fully open source effort with renewed commitment to community maintenance:

astubbs/parallel-consumer Java ★ 0 ☍ 1

Original location at Confluent:

confluentinc/parallel-consumer Java ★ 282 ☍ 165
Share: X LinkedIn