Kafka Consumer: What does it mean to "hash into queues"?

Viewed 57

In the Javadoc for KafkaConsumer, under the section 2. Decouple Consumption and Processing, it is stated as follows:

There are many possible variations on [the threading approach where there is one or more consumers that do all data consumption, and hand off ConsumerRecords instances to a blocking queue of processor threads]. For example each processor thread can have its own queue, and the consumer threads can hash into these queues using the TopicPartition to ensure in-order consumption and simplify commit.

Question:

What does it mean for the consumer threads to hash into [the] queues? And how does that ensure in-order consumption and simplify commit?

0 Answers
Related