admin管理员组文章数量:1333404
TLDR; How is
void seek(Function<String,Object> function)
throws PulsarClientException
in the pulsar reader API expected to be used?
-- More info
I'd like to read messages from a pulsar topic that is partitioned.
Previously I have used seek(Long timestamp) of PulsarReader but there is a note there, "Note: this operation can only be done on non-partitioned topics. For these, one can rather perform the seek() on the individual partitions."
Then I read the seek(Function<String,Object> function) API, which says "The Function input is topic+partition. It returns only timestamp or MessageId."
How does one create a Function that refers to, say, a partition called, say, persistent://my-path/.../my-topic-v1-partition-0, persistent://my-path/.../my-topic-v1-partition-1, persistent://my-path/.../my-topic-v1-partition-2
Or perhaps this API was not meant to be exposed?
I see the open source implementation here and it looks like the passed in Function is supposed to return an Object seekPosition
but to construct the Function to begin with is not clear.
本文标签: javaPulsar Reader seek for topics with partitionsStack Overflow
版权声明:本文标题:java - Pulsar Reader seek for topics with partitions - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742331344a2454757.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论