This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/master by this push: new c44f79f [create-pull-request] automated change c44f79f is described below commit c44f79f6eeddcad36bb27c0d57bc4be27dc7ce09 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Fri Jun 26 01:33:25 2020 +0000 [create-pull-request] automated change --- .../springboot/catalog/components/pulsar.json | 4 +++ .../src/main/docs/pulsar-starter.adoc | 4 ++- .../springboot/PulsarComponentConfiguration.java | 29 ++++++++++++++++++++++ docs/modules/ROOT/pages/pulsar-starter.adoc | 4 ++- 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/pulsar.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/pulsar.json index 78610aa..f5cf5ee 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/pulsar.json +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/pulsar.json @@ -35,7 +35,9 @@ "numberOfConsumers": { "kind": "property", "displayName": "Number Of Consumers", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "defaultValue": "1", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Number of consumers - defaults to 1" }, "subscriptionInitialPosition": { "kind": "property", "displayName": "Subscription Initial Position", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.pulsar.utils.consumers.SubscriptionInitialPosition", "enum": [ "EARLIEST", "LATEST" ], "deprecated": false, "secret": false, "defaultValue": "LATEST", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", [...] "subscriptionName": { "kind": "property", "displayName": "Subscription Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "subs", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Name of the subscription to use" }, + "subscriptionTopicsMode": { "kind": "property", "displayName": "Subscription Topics Mode", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.pulsar.client.api.RegexSubscriptionMode", "enum": [ "PersistentOnly", "NonPersistentOnly", "AllTopics" ], "deprecated": false, "secret": false, "defaultValue": "PersistentOnly", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration" [...] "subscriptionType": { "kind": "property", "displayName": "Subscription Type", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.pulsar.utils.consumers.SubscriptionType", "enum": [ "EXCLUSIVE", "SHARED", "FAILOVER", "KEY_SHARED" ], "deprecated": false, "secret": false, "defaultValue": "EXCLUSIVE", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "de [...] + "topicsPattern": { "kind": "property", "displayName": "Topics Pattern", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Whether the topic is a pattern (regular expression) that allows the consumer to subscribe to all matching topics in th [...] "pulsarMessageReceiptFactory": { "kind": "property", "displayName": "Pulsar Message Receipt Factory", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.pulsar.PulsarMessageReceiptFactory", "deprecated": false, "secret": false, "description": "Provide a factory to create an alternate implementation of PulsarMessageReceipt." }, "batcherBuilder": { "kind": "property", "displayName": "Batcher Builder", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.pulsar.client.api.BatcherBuilder", "deprecated": false, "secret": false, "defaultValue": "DEFAULT", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Control batching method used by the producer." }, "batchingEnabled": { "kind": "property", "displayName": "Batching Enabled", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Control whether automatic batching of messages is enabled for the producer." }, @@ -73,7 +75,9 @@ "numberOfConsumers": { "kind": "parameter", "displayName": "Number Of Consumers", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "defaultValue": "1", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Number of consumers - defaults to 1" }, "subscriptionInitialPosition": { "kind": "parameter", "displayName": "Subscription Initial Position", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.pulsar.utils.consumers.SubscriptionInitialPosition", "enum": [ "EARLIEST", "LATEST" ], "deprecated": false, "secret": false, "defaultValue": "LATEST", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfigur [...] "subscriptionName": { "kind": "parameter", "displayName": "Subscription Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "subs", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Name of the subscription to use" }, + "subscriptionTopicsMode": { "kind": "parameter", "displayName": "Subscription Topics Mode", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.pulsar.client.api.RegexSubscriptionMode", "enum": [ "PersistentOnly", "NonPersistentOnly", "AllTopics" ], "deprecated": false, "secret": false, "defaultValue": "PersistentOnly", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfigu [...] "subscriptionType": { "kind": "parameter", "displayName": "Subscription Type", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.pulsar.utils.consumers.SubscriptionType", "enum": [ "EXCLUSIVE", "SHARED", "FAILOVER", "KEY_SHARED" ], "deprecated": false, "secret": false, "defaultValue": "EXCLUSIVE", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguratio [...] + "topicsPattern": { "kind": "parameter", "displayName": "Topics Pattern", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Whether the topic is a pattern (regular expression) that allows the consumer to subscribe to all matching topic [...] "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with [...] "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, "batcherBuilder": { "kind": "parameter", "displayName": "Batcher Builder", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.pulsar.client.api.BatcherBuilder", "deprecated": false, "secret": false, "defaultValue": "DEFAULT", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Control batching method used by the producer." }, diff --git a/components-starter/camel-pulsar-starter/src/main/docs/pulsar-starter.adoc b/components-starter/camel-pulsar-starter/src/main/docs/pulsar-starter.adoc index 966fd6e..e6875ac 100644 --- a/components-starter/camel-pulsar-starter/src/main/docs/pulsar-starter.adoc +++ b/components-starter/camel-pulsar-starter/src/main/docs/pulsar-starter.adoc @@ -17,7 +17,7 @@ When using pulsar with Spring Boot make sure to use the following Maven dependen ---- -The component supports 34 options, which are listed below. +The component supports 36 options, which are listed below. @@ -57,6 +57,8 @@ The component supports 34 options, which are listed below. | *camel.component.pulsar.send-timeout-ms* | Send timeout in milliseconds | 30000 | Integer | *camel.component.pulsar.subscription-initial-position* | Control the initial position in the topic of a newly created subscription. Default is latest message. | | SubscriptionInitialPosition | *camel.component.pulsar.subscription-name* | Name of the subscription to use | subs | String +| *camel.component.pulsar.subscription-topics-mode* | Determines to which topics this consumer should be subscribed to - Persistent, Non-Persistent, or both. Only used with pattern subscriptions. | | RegexSubscriptionMode | *camel.component.pulsar.subscription-type* | Type of the subscription EXCLUSIVESHAREDFAILOVERKEY_SHARED, defaults to EXCLUSIVE | | SubscriptionType +| *camel.component.pulsar.topics-pattern* | Whether the topic is a pattern (regular expression) that allows the consumer to subscribe to all matching topics in the namespace | false | Boolean |=== // spring-boot-auto-configure options: END diff --git a/components-starter/camel-pulsar-starter/src/main/java/org/apache/camel/component/pulsar/springboot/PulsarComponentConfiguration.java b/components-starter/camel-pulsar-starter/src/main/java/org/apache/camel/component/pulsar/springboot/PulsarComponentConfiguration.java index 5f1074c..a04fba6 100644 --- a/components-starter/camel-pulsar-starter/src/main/java/org/apache/camel/component/pulsar/springboot/PulsarComponentConfiguration.java +++ b/components-starter/camel-pulsar-starter/src/main/java/org/apache/camel/component/pulsar/springboot/PulsarComponentConfiguration.java @@ -23,6 +23,7 @@ import org.apache.camel.component.pulsar.utils.consumers.SubscriptionType; import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon; import org.apache.pulsar.client.api.CompressionType; import org.apache.pulsar.client.api.MessageRoutingMode; +import org.apache.pulsar.client.api.RegexSubscriptionMode; import org.springframework.boot.context.properties.ConfigurationProperties; /** @@ -117,11 +118,22 @@ public class PulsarComponentConfiguration */ private String subscriptionName = "subs"; /** + * Determines to which topics this consumer should be subscribed to - + * Persistent, Non-Persistent, or both. Only used with pattern + * subscriptions. + */ + private RegexSubscriptionMode subscriptionTopicsMode = RegexSubscriptionMode.PersistentOnly; + /** * Type of the subscription EXCLUSIVESHAREDFAILOVERKEY_SHARED, defaults to * EXCLUSIVE */ private SubscriptionType subscriptionType = SubscriptionType.EXCLUSIVE; /** + * Whether the topic is a pattern (regular expression) that allows the + * consumer to subscribe to all matching topics in the namespace + */ + private Boolean topicsPattern = false; + /** * Provide a factory to create an alternate implementation of * PulsarMessageReceipt. The option is a * org.apache.camel.component.pulsar.PulsarMessageReceiptFactory type. @@ -330,6 +342,15 @@ public class PulsarComponentConfiguration this.subscriptionName = subscriptionName; } + public RegexSubscriptionMode getSubscriptionTopicsMode() { + return subscriptionTopicsMode; + } + + public void setSubscriptionTopicsMode( + RegexSubscriptionMode subscriptionTopicsMode) { + this.subscriptionTopicsMode = subscriptionTopicsMode; + } + public SubscriptionType getSubscriptionType() { return subscriptionType; } @@ -338,6 +359,14 @@ public class PulsarComponentConfiguration this.subscriptionType = subscriptionType; } + public Boolean getTopicsPattern() { + return topicsPattern; + } + + public void setTopicsPattern(Boolean topicsPattern) { + this.topicsPattern = topicsPattern; + } + public String getPulsarMessageReceiptFactory() { return pulsarMessageReceiptFactory; } diff --git a/docs/modules/ROOT/pages/pulsar-starter.adoc b/docs/modules/ROOT/pages/pulsar-starter.adoc index 966fd6e..e6875ac 100644 --- a/docs/modules/ROOT/pages/pulsar-starter.adoc +++ b/docs/modules/ROOT/pages/pulsar-starter.adoc @@ -17,7 +17,7 @@ When using pulsar with Spring Boot make sure to use the following Maven dependen ---- -The component supports 34 options, which are listed below. +The component supports 36 options, which are listed below. @@ -57,6 +57,8 @@ The component supports 34 options, which are listed below. | *camel.component.pulsar.send-timeout-ms* | Send timeout in milliseconds | 30000 | Integer | *camel.component.pulsar.subscription-initial-position* | Control the initial position in the topic of a newly created subscription. Default is latest message. | | SubscriptionInitialPosition | *camel.component.pulsar.subscription-name* | Name of the subscription to use | subs | String +| *camel.component.pulsar.subscription-topics-mode* | Determines to which topics this consumer should be subscribed to - Persistent, Non-Persistent, or both. Only used with pattern subscriptions. | | RegexSubscriptionMode | *camel.component.pulsar.subscription-type* | Type of the subscription EXCLUSIVESHAREDFAILOVERKEY_SHARED, defaults to EXCLUSIVE | | SubscriptionType +| *camel.component.pulsar.topics-pattern* | Whether the topic is a pattern (regular expression) that allows the consumer to subscribe to all matching topics in the namespace | false | Boolean |=== // spring-boot-auto-configure options: END