如何从kafka中读取已提交的消息

时间:2020-07-17 12:46:26

标签: apache-kafka kafka-consumer-api spring-kafka confluent-platform

我在kafka中有要求,想从kafka中读取已提交的消息,而不是所有消息

1 个答案:

答案 0 :(得分:1)

使用spring-kafka,实现ConsumerSeekAware,您可以在启动过程中寻求所需的任何偏移量。

请参见the documentation