@Override
                public void onSuccess(ListOffsetResult partialResult) {
                    synchronized (listOffsetRequestsFuture) {
                        fetchedTimestampOffsets.putAll(partialResult.fetchedOffsets);
                        partitionsToRetry.addAll(partialResult.partitionsToRetry);

                        if (remainingResponses.decrementAndGet() == 0 && !listOffsetRequestsFuture.isDone()) {
                            ListOffsetResult result = new ListOffsetResult(fetchedTimestampOffsets, partitionsToRetry);
                            listOffsetRequestsFuture.complete(result);
                        }
                    }
                }
Search the offsets by target times for the specified partitions.

@param timestampsToSearch the mapping between partitions and target time
@param requireTimestamps  true if we should fail with an UnsupportedVersionException if the broker does
                          not support fetching precise timestamps for offsets
@return A response which can be polled to obtain the corresponding timestamps and offsets.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/OffsetFetcher.java