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
ConsumerRecordsinstances 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?