-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Support partitioned topics in the Reader #7518
Conversation
Any progress on this? :) |
@sollecitom : @jiazhai @codelipenghui will review this pull request today |
/pulsarbot run-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The topics of the multiple topics consumer may belong to different partitioned topics, looks the PR assume topics of the multiple topics consumer belong to a partitioned topic, please double-check.
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
Outdated
Show resolved
Hide resolved
There are still some details of this requirement that need to be discussed:
Thanks for @codelipenghui 's suggestion: |
/pulsarbot run-failure-checks |
4 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
Seeking to a specific MessageId seems to be mandatory though. How should one resume reading otherwise? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me.
@slinstaedt We will support the reader to seek to the earliest position or the latest position first. Seek to a specific position is confusing in the partitioned reader, we can try to support later since there is not a good idea yet. |
@315157973 Can you rebase it to the latest master? |
/pulsarbot run-failure-checks |
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 .
Motivation We already added the seek support for multi-topics consumer in apache#7518. But the note for seek method haven't been updated. Modification * Update the doc for seek method in the consumer. Signed-off-by: Zike Yang <[email protected]>
### Motivation We already added the seek support for multi-topics consumer in #7518. But the note for seek method hasn't been updated. ### Modifications * Update the doc for seek method in the consumer.
### Motivation We already added the seek support for multi-topics consumer in apache#7518. But the note for seek method hasn't been updated. ### Modifications * Update the doc for seek method in the consumer.
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 .
Verifying this change
unit tests:
TopicReaderTest
MultiTopicsReaderTest
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation