Description
Search before asking
- I searched in the issues and found nothing similar.
Motivation
Multi-topic Readers already exist, but unlike Consumers a multi-topic Reader cannot be built from a regex pattern. If the Reader interface supported this then TableView, which is backed by Reader, should easily be able to also allow regex pattern matching on topics. This is really useful for event sourcing, where you may want to read from a certain point in time.
Solution
The MultiTopicReaderImpl class already uses a MultiTopicsComsunerImpl internally. The PatternMultiTopicsConsumerImpl class extends the MultiTopicsComsunerImpl, so the MultiTopicReaderImpl can likely just use a PatternMultiTopicConsumerImpl whenever the ReaderConfigurationData suggests in.
Alternatives
You can technically use a Consumer similarly to a Reader, by starting a Consumer with a new subscription each time so you don't pick up at the last acknowledged message. This is dirty however, and doesn't provide all the features of a Reader nor does it allow you to use a TableView.
Anything else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!