New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[client] Support seek at partitioned topic #3643
Comments
Agree. It doesn't make sense not to support earliest/latest...
If the seek operation only affects the cursor in one partition, it might become confusing to a user, since it's a different behavior from the above. In general, I'm not a big fan of seek by message id on the consumer interface, since the purpose of |
@sijie Is this feature expected to have time to do? |
Fixes #3643 #7265 ### Motivation Support partitioned topics in the Reader ### Modifications class relationship: PulsarClientImpl -> MultiTopicsReaderImpl -> MultiTopicsConsumerImpl -> ConsumerImpl PulsarClientImpl support build MultiTopicsReader MultiTopicsReader wraps one MultiTopicsConsumerImpl MultiTopicsConsumerImpl contains multiple consumerImpl Make MultiTopicsConsumerImpl support seek by messageId seek by time: All consumerImpl seek by time, Reader can get all the messages returned by each partition seek by message: 1)When seek by latest/earliest,all partitions seek by latest/earliest,Reader can get all the messages returned by each partition 2)When the messageId contains explicit partition information, it will only receive messages from this partition, and will not receive messages from other partitions.To avoid other partitions returning messages in inclusive mode, I make other consumer seek to latest and add a ignoredConsumersSet to ignore messages from other partitions .
Fixes apache#3643 apache#7265 ### Motivation Support partitioned topics in the Reader ### Modifications class relationship: PulsarClientImpl -> MultiTopicsReaderImpl -> MultiTopicsConsumerImpl -> ConsumerImpl PulsarClientImpl support build MultiTopicsReader MultiTopicsReader wraps one MultiTopicsConsumerImpl MultiTopicsConsumerImpl contains multiple consumerImpl Make MultiTopicsConsumerImpl support seek by messageId seek by time: All consumerImpl seek by time, Reader can get all the messages returned by each partition seek by message: 1)When seek by latest/earliest,all partitions seek by latest/earliest,Reader can get all the messages returned by each partition 2)When the messageId contains explicit partition information, it will only receive messages from this partition, and will not receive messages from other partitions.To avoid other partitions returning messages in inclusive mode, I make other consumer seek to latest and add a ignoredConsumersSet to ignore messages from other partitions .
Is your feature request related to a problem? Please describe.
Currently seeking is not supported on partitioned topics.
Describe the solution you'd like
It should be doable to support seek on partitioned topics.
Because:
Describe alternatives you've considered
No other alternative. We can just decide not to support it.
Additional context
It would be much easier for people to use if we support
seek
at partitioned topics.The text was updated successfully, but these errors were encountered: