title: Poll one message from each partition from requested topic
body: <p>I am currently using <code>org.apache.kafka.clients.consumer.Consumer</code>, but I am open to any java client if I can ensure what I need.</p>
  <p>Is it possible to poll one message from each partition of the requested topic using a single <code>group-id</code>?</p>
  <p>My case is that I want to poll the last current message from each partition on a particular topic. I have an implementation where I created one consumer per partition and just polled one time for each - smth like that:</p>
  <pre><code>final String topic = &quot;requested-topic&quot;;
  
  final Consumer&lt;String, ParcelInboxEvent&gt; consumer1 = jsonConsumerFactory.createConsumer(&quot;monitor&quot;);
  final Consumer&lt;String, ParcelInboxEvent&gt; consumer2 = jsonConsumerFactory.createConsumer(&quot;monitor&quot;);
  
  consumer1.assign(List.of(new TopicPartition(topic, 0)));
  consumer1.seekToEnd(List.of(new TopicPartition(topic, 0)));
  consumer1.seek(new TopicPartition(topic, 0), consumer1.position(new TopicPartition(topic, 0)) - 1);
      
  consumer2.assign(List.of(new TopicPartition(topic, 1)));
  consumer2.seekToEnd(List.of(new TopicPartition(topic, 1)));
  consumer2.seek(new TopicPartition(topic, 1), consumer2.position(new TopicPartition(topic, 1)) - 1);
  
  final ConsumerRecords&lt;String, Object&gt; poll1 = consumer1.poll(Duration.ofSeconds(10));
  final ConsumerRecords&lt;String, Object&gt; poll2 = consumer2.poll(Duration.ofSeconds(10));
  </code></pre>
  <p>but I wonder if I can do it in one step, using one consumer.</p>