Share this page

# LrKafkaConsumer.offsetsForTimes

Calls the offsetsForTimes method on the KafkaConsumer initialized for the Vuser.

`public static Map<TopicPartition, OffsetAndTimestamp> offsetsForTimes(Map<TopicPartition, Long> timestampsToSearch)`

`public static Map<TopicPartition, OffsetAndTimestamp> offsetsForTimes(Map<TopicPartition, Long> timestampsToSearch, Duration timeout)`

## Arguments

Name | Description
--- | ---
timeStampsToSearch | Map of partition and timestamps
timeout | Timeout limit, as a duration object

## Return values

Returns the offsets for the given partitions by timestamp.

## General information

This function looks up the offsets for the given partitions by timestamp.

For more information about this function, see the Apache Kafka documentation.

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: