(PECL rdkafka >= 4.0.0, librdkafka >= 0.9.4)
RdKafka\KafkaConsumer::offsetsForTimes — Get offsets for timestamps
$topicPartitions
, integer $timeout_ms
) : arrayGets the earliest offset for a given timestamp for an array of RdKafka\TopicPartition
topicPartitions
(array)Is an array of RdKafka\TopicPartition, assign your timestamp to the offset during instantiation of RdKafka\TopicPartition
timeout_ms
(integer)The timout in milliseconds for the offset fetch
Returns an array of RdKafka\TopicPartition where the offset is now the earliest offset found for the given timestamp