You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/06/24 12:20:00 UTC

[jira] [Commented] (CAMEL-15231) Support topic patterns in Pulsar when subscribing

    [ https://issues.apache.org/jira/browse/CAMEL-15231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17143797#comment-17143797 ] 

Claus Ibsen commented on CAMEL-15231:
-------------------------------------

Yeah that should be possible. Its to use topicsPattern instead of topic here
https://github.com/apache/camel/blob/968b29e5ac4816ae90574d0883b7508e96f2727c/components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/utils/consumers/CommonCreationStrategyImpl.java#L37

However we should have a way to know if its a pattern or not.

Either we add a new option you must set as well

- topicsPattern=true

Or we try to guess from the uri that its a pattern - but it can be a bit harder when its regexp as you can say (blue|green) and not only use wildcards.


> Support topic patterns in Pulsar when subscribing
> -------------------------------------------------
>
>                 Key: CAMEL-15231
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15231
>             Project: Camel
>          Issue Type: Wish
>          Components: camel-pulsar
>    Affects Versions: 3.4.0
>            Reporter: Scott Anderson
>            Priority: Major
>             Fix For: 3.x
>
>
> Pulsar supports a fantastic feature that is very common to Pulsar users. That is subscribing to a pattern of topics defined by a regular expression.
> // Subscribe to all topics in a namespacePattern allTopicsInNamespace = Pattern.compile("persistent://public/default/.*");{ Consumer<byte[]> allTopicsConsumer = pulsarClient.newConsumer()
>  .topicsPattern(allTopicsInNamespace)
>  .subscriptionName("subscription-1")
>  .subscribe();
> The Pulsar component in camel doesn't seem to support this important use case. I'm wondering if someone familiar with the Camel Pulsar component could estimate the level of effort for a change like this. I'm not familiar enough with the project to even pinpoint where a change like this should go.}}
> See also:
> https://pulsar.apache.org/docs/en/concepts-messaging/#multi-topic-subscriptions



--
This message was sent by Atlassian Jira
(v8.3.4#803005)