Offsets for a given partition at a particular timestamp can now be found using offsetsForTimes API. https://kafka.apache.org/0110/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html#offsetsForTimes(java.util.Map).
One way to make use of this api would be to :
Add a new option for FirstPollOffsetStrategy called TIMESTAMP
Add a new startTimeStamp option to KafkaSpoutConfig, which would be used only when FirstPollOffsetStrategy is set to TIMESTAMP.
Later in the KafkaTridentSpoutEmitter, when we do the first seek, we can do something like :