本文介绍了如何使用Kafka Console Consumer在两个时间戳之间使用消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在Kafka控制台消耗者中检索特定时间戳范围内的消息?
Is it possible to retrieve messages in Kafka console conumer for a particular timestamp range?
例如,kafka messags昨天在08:00到09:00之间.
For example kafka messags between 08:00 to 09:00 yesterday.
推荐答案您可以使用 kafkacat 用于在两个时间戳之间使用消息:
You can use kafkacat for consuming messages between two timestamps:
kafkacat -b localhost:9092 -C -t mytopic -o s@1568276612443 -o e@1568276617901其中
- s @ 表示开始时间戳(以毫秒为单位)
- e @ 表示以ms结尾的timtestamp(非包容性)
- s@ denotes the starting timestamp in ms
- e@ denotes the ending timtestamp in ms (non-inclusive)
更多推荐
如何使用Kafka Console Consumer在两个时间戳之间使用消息
发布评论