vertx / io.vertx.kafka.client.consumer / KafkaConsumer / offsetsForTimes

offsetsForTimes

abstract fun offsetsForTimes(topicPartitionTimestamps: MutableMap<TopicPartition, Long>, handler: Handler<AsyncResult<MutableMap<TopicPartition, OffsetAndTimestamp>>>): Unit

Look up the offsets for the given partitions by timestamp. Note: the result might be empty in case for the given timestamp no offset can be found -- e.g., when the timestamp refers to the future

Parameters

topicPartitionTimestamps - A map with pairs of (TopicPartition, Timestamp).

handler - handler called on operation completed

abstract fun offsetsForTimes(topicPartition: TopicPartition, timestamp: Long, handler: Handler<AsyncResult<OffsetAndTimestamp>>): Unit

Look up the offset for the given partition by timestamp. Note: the result might be null in case for the given timestamp no offset can be found -- e.g., when the timestamp refers to the future

Parameters

topicPartition - TopicPartition to query.

timestamp - Timestamp to be used in the query.

handler - handler called on operation completed