I am trying to extract message of kafka queue based on certain time ranges, say between Oct 2, 1 PM and Oct 2, 3 PM
. How can I explicitly define this time range and just pull data off these time ranges.
bootstrap_servers = ['servername.com']
topicName = 'sales_topic'
consumer = KafkaConsumer(topicName, group_id='sales', bootstrap_servers=bootstrap_servers, auto_offset_reset='earliest', consumer_timeout_ms=20000)
I read about offsets_for_times
but I am not sure how to use that. Any help around this would be appreciated.