RdKafka\KafkaConsumer::offsetsForTimes

(PECL rdkafka >= 4.0.0, librdkafka >= 0.9.4)

RdKafka\KafkaConsumer::offsetsForTimesGet offsets for timestamps

Description

public RdKafka\KafkaConsumer::offsetsForTimes ( array $topicPartitions , integer $timeout_ms ) : array

Gets the earliest offset for a given timestamp for an array of RdKafka\TopicPartition

Parameters

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

Return Values

Returns an array of RdKafka\TopicPartition where the offset is now the earliest offset found for the given timestamp