You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "tsturzl (via GitHub)" <gi...@apache.org> on 2024/03/04 20:29:20 UTC

[I] Reader and TableView should support regex pattern matching [pulsar]

tsturzl opened a new issue, #22195:
URL: https://github.com/apache/pulsar/issues/22195

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/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?
   
   - [X] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org