title: Kafka consumer poll behavior and order
body: <p>lets say my consumer is polling from a broker that has have multiple topics and each topic has multiple partitions. I have a total of 5 consumers in the same consumer group. If each of my consumer does a poll, what will be the order of data that will be return? </p>
  
  <p>Example my first consumer is assigned to the following partition:</p>
  
  <p>topicA - partition 0</p>
  
  <p>topicA - partition 1</p>
  
  <p>topicB - partitions 0</p>
  
  <p>topicC - partitions 3</p>
  
  <p>topicD - partitions 5</p>
  
  <p><strong>My question is that in that single 1 poll will i receive all available messages from that topic/partition before moving to the next topic/partition in order? meaning for example:</strong> </p>
  
  <p>In a single poll loop, I received this in order...</p>
  
  <p>Behavior A</p>
  
  <p>topicA - partition 1 - received message from offset 1000...2000</p>
  
  <p>topicA - partition 0 - received message from offset 500...700</p>
  
  <p>topicB - partition 0 - received message from offset 100...150</p>
  
  <p>topicC - partitions 3 - received message from offset 5500...6000</p>
  
  <p>topicD - partitions 5 - received message from offset 0...100</p>
  
  <p><strong>or in that single 1 poll loop, it is possible to receive this message order? That same partition and topic will be split (topicA partition 1, topicA - partition 0 and topicC - partitions 3)</strong></p>
  
  <p>Behavior B</p>
  
  <p>topicA - partition 1 - received message from offset 1000...1499</p>
  
  <p>topicA - partition 0 - received message from offset 500...520</p>
  
  <p><strong>topicA - partition 1 - received message from offset 1500...2000</strong></p>
  
  <p>topicB - partition 0 - received message from offset 100...150 - same as behavior A no split</p>
  
  <p>topicC - partitions 3 - received message from offset 5500...5799</p>
  
  <p><strong>topicA - partition 0 - received message from offset 521...700</strong></p>
  
  <p>topicD - partitions 5 - received message from offset 0...100 - same as behavior A no split</p>
  
  <p><strong>topicC - partitions 3 - received message from offset 5800...6000</strong></p>
  
  <p>I want to know about this behavior and if it guarantee and will be consistent to be behavior A or B or can be configure. I have search this up but couldn't find it anywhere in doc or question asked before. I have also tested it myself and it seems to always be behavior A but I want to confirm it. Thanks and appreciate for any help in advance.</p>