code: public static boolean seek(KafkaConsumer<?, ?> consumer, KafkaTopicPartitionOffset tpo) {
          synchronized (consumer) {
              Set<TopicPartition> topicParts = consumer.assignment();
              if (topicParts != null) {
                  for (TopicPartition tp : topicParts) {
                      if (StringUtils.equals(tpo.topic, tp.topic())
                              && tpo.partition == tp.partition()) {
                          consumer.seek(tp, tpo.offset);
                          // we want to seek as soon as possible
                          // since seekToEnd evaluates lazily, invoke position()
                          // so
                          // that seeking will be committed.
                          consumer.position(tp);
                          return true;
                      }
                  }
              }
          }
          return false;
      }
docs: Seeks to a specified offset.
  
  @param consumer
  @param tpo
  @return {@code true} if the consumer has subscribed to the specified
  topic/partition, {@code false} otherwise.
  @since 1.3.2