You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/08/14 15:01:04 UTC

[camel-spring-boot] branch main updated: [create-pull-request] automated change (#607)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 2508a7b3d63 [create-pull-request] automated change (#607)
2508a7b3d63 is described below

commit 2508a7b3d637ac69d131e22fcfce9d3dea6745ce
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Sun Aug 14 17:01:00 2022 +0200

    [create-pull-request] automated change (#607)
    
    Co-authored-by: oscerd <os...@users.noreply.github.com>
---
 .../springboot/catalog/components/pulsar.json      |  4 +++
 .../camel-pulsar-starter/src/main/docs/pulsar.json | 12 +++++++++
 .../springboot/PulsarComponentConfiguration.java   | 29 ++++++++++++++++++++++
 .../springboot/PulsarComponentConverter.java       |  2 ++
 4 files changed, 47 insertions(+)

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 957a8791116..09f841873b7 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
@@ -28,6 +28,7 @@
     "serviceUrl": { "kind": "property", "displayName": "Service Url", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "The Pulsar Service URL to point while creating the client from URI" },
     "ackGroupTimeMillis": { "kind": "property", "displayName": "Ack Group Time Millis", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 100, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Group the consumer acknowledgments for the specified time in milliseconds - defaults to 100" },
     "ackTimeoutMillis": { "kind": "property", "displayName": "Ack Timeout Millis", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 10000, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Timeout for unacknowledged messages in milliseconds - defaults to 10000" },
+    "ackTimeoutRedeliveryBackoff": { "kind": "property", "displayName": "Ack Timeout Redelivery Backoff", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.pulsar.client.api.RedeliveryBackoff", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "RedeliveryBackoff to use for ack timeout redelivery b [...]
     "allowManualAcknowledgement": { "kind": "property", "displayName": "Allow Manual Acknowledgement", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Whether to allow manual message acknowledgements. If this option is ena [...]
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a me [...]
     "consumerName": { "kind": "property", "displayName": "Consumer Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "sole-consumer", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Name of the consumer when subscription is EXCLUSIVE" },
@@ -36,6 +37,7 @@
     "deadLetterTopic": { "kind": "property", "displayName": "Dead Letter Topic", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Name of the topic where the messages which fail maxRedeliverCount times will be sent. Note: if not set, defa [...]
     "maxRedeliverCount": { "kind": "property", "displayName": "Max Redeliver Count", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Maximum number of times that a message will be redelivered before being sent to the dead letter queue. [...]
     "messageListener": { "kind": "property", "displayName": "Message Listener", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Whether to use the messageListener interface, or to receive messages using a separate thread pool" },
+    "negativeAckRedeliveryBackoff": { "kind": "property", "displayName": "Negative Ack Redelivery Backoff", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.pulsar.client.api.RedeliveryBackoff", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "RedeliveryBackoff to use for negative ack redeliver [...]
     "negativeAckRedeliveryDelayMicros": { "kind": "property", "displayName": "Negative Ack Redelivery Delay Micros", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 60000000, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Set the negative acknowledgement delay" },
     "numberOfConsumers": { "kind": "property", "displayName": "Number Of Consumers", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Number of consumers - defaults to 1" },
     "numberOfConsumerThreads": { "kind": "property", "displayName": "Number Of Consumer Threads", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "configuration", "description": "Number of threads to receive and handle messages when using a separate thread pool" },
@@ -90,6 +92,7 @@
     "serviceUrl": { "kind": "parameter", "displayName": "Service Url", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "The Pulsar Service URL to point while creating the client from URI" },
     "ackGroupTimeMillis": { "kind": "parameter", "displayName": "Ack Group Time Millis", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 100, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Group the consumer acknowledgments for the specified time in milliseconds - defaults [...]
     "ackTimeoutMillis": { "kind": "parameter", "displayName": "Ack Timeout Millis", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 10000, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Timeout for unacknowledged messages in milliseconds - defaults to 10000" },
+    "ackTimeoutRedeliveryBackoff": { "kind": "parameter", "displayName": "Ack Timeout Redelivery Backoff", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.pulsar.client.api.RedeliveryBackoff", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "RedeliveryBackoff to use for ack timeout redel [...]
     "allowManualAcknowledgement": { "kind": "parameter", "displayName": "Allow Manual Acknowledgement", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Whether to allow manual message acknowledgements. If this option [...]
     "consumerName": { "kind": "parameter", "displayName": "Consumer Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "sole-consumer", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Name of the consumer when subscription is EXCLUSIVE" },
     "consumerNamePrefix": { "kind": "parameter", "displayName": "Consumer Name Prefix", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "cons", "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Prefix to add to consumer names when a SHARED or FAILOVER subscription  [...]
@@ -97,6 +100,7 @@
     "deadLetterTopic": { "kind": "parameter", "displayName": "Dead Letter Topic", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Name of the topic where the messages which fail maxRedeliverCount times will be sent. Note: if not se [...]
     "maxRedeliverCount": { "kind": "parameter", "displayName": "Max Redeliver Count", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Maximum number of times that a message will be redelivered before being sent to the dead letter [...]
     "messageListener": { "kind": "parameter", "displayName": "Message Listener", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Whether to use the messageListener interface, or to receive messages using a separate th [...]
+    "negativeAckRedeliveryBackoff": { "kind": "parameter", "displayName": "Negative Ack Redelivery Backoff", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.pulsar.client.api.RedeliveryBackoff", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "RedeliveryBackoff to use for negative ack re [...]
     "negativeAckRedeliveryDelayMicros": { "kind": "parameter", "displayName": "Negative Ack Redelivery Delay Micros", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 60000000, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Set the negative acknowledgement delay" },
     "numberOfConsumers": { "kind": "parameter", "displayName": "Number Of Consumers", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Number of consumers - defaults to 1" },
     "numberOfConsumerThreads": { "kind": "parameter", "displayName": "Number Of Consumer Threads", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.pulsar.PulsarConfiguration", "configurationField": "pulsarConfiguration", "description": "Number of threads to receive and handle messages when using a separate thread [...]
diff --git a/components-starter/camel-pulsar-starter/src/main/docs/pulsar.json b/components-starter/camel-pulsar-starter/src/main/docs/pulsar.json
index 5e2a9aa1a83..cce795ecaa8 100644
--- a/components-starter/camel-pulsar-starter/src/main/docs/pulsar.json
+++ b/components-starter/camel-pulsar-starter/src/main/docs/pulsar.json
@@ -27,6 +27,12 @@
       "sourceType": "org.apache.camel.component.pulsar.springboot.PulsarComponentConfiguration",
       "defaultValue": 10000
     },
+    {
+      "name": "camel.component.pulsar.ack-timeout-redelivery-backoff",
+      "type": "org.apache.pulsar.client.api.RedeliveryBackoff",
+      "description": "RedeliveryBackoff to use for ack timeout redelivery backoff. The option is a org.apache.pulsar.client.api.RedeliveryBackoff type.",
+      "sourceType": "org.apache.camel.component.pulsar.springboot.PulsarComponentConfiguration"
+    },
     {
       "name": "camel.component.pulsar.allow-manual-acknowledgement",
       "type": "java.lang.Boolean",
@@ -203,6 +209,12 @@
       "description": "Message Routing Mode to use",
       "sourceType": "org.apache.camel.component.pulsar.springboot.PulsarComponentConfiguration"
     },
+    {
+      "name": "camel.component.pulsar.negative-ack-redelivery-backoff",
+      "type": "org.apache.pulsar.client.api.RedeliveryBackoff",
+      "description": "RedeliveryBackoff to use for negative ack redelivery backoff. The option is a org.apache.pulsar.client.api.RedeliveryBackoff type.",
+      "sourceType": "org.apache.camel.component.pulsar.springboot.PulsarComponentConfiguration"
+    },
     {
       "name": "camel.component.pulsar.negative-ack-redelivery-delay-micros",
       "type": "java.lang.Long",
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 3a8f70b061e..dca33662710 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
@@ -29,6 +29,7 @@ import org.apache.pulsar.client.api.CompressionType;
 import org.apache.pulsar.client.api.MessageRouter;
 import org.apache.pulsar.client.api.MessageRoutingMode;
 import org.apache.pulsar.client.api.PulsarClient;
+import org.apache.pulsar.client.api.RedeliveryBackoff;
 import org.apache.pulsar.client.api.RegexSubscriptionMode;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
@@ -76,6 +77,11 @@ public class PulsarComponentConfiguration
      * Timeout for unacknowledged messages in milliseconds - defaults to 10000
      */
     private Long ackTimeoutMillis = 10000L;
+    /**
+     * RedeliveryBackoff to use for ack timeout redelivery backoff. The option
+     * is a org.apache.pulsar.client.api.RedeliveryBackoff type.
+     */
+    private RedeliveryBackoff ackTimeoutRedeliveryBackoff;
     /**
      * Whether to allow manual message acknowledgements. If this option is
      * enabled, then messages are not acknowledged automatically after
@@ -124,6 +130,11 @@ public class PulsarComponentConfiguration
      * using a separate thread pool
      */
     private Boolean messageListener = true;
+    /**
+     * RedeliveryBackoff to use for negative ack redelivery backoff. The option
+     * is a org.apache.pulsar.client.api.RedeliveryBackoff type.
+     */
+    private RedeliveryBackoff negativeAckRedeliveryBackoff;
     /**
      * Set the negative acknowledgement delay
      */
@@ -313,6 +324,15 @@ public class PulsarComponentConfiguration
         this.ackTimeoutMillis = ackTimeoutMillis;
     }
 
+    public RedeliveryBackoff getAckTimeoutRedeliveryBackoff() {
+        return ackTimeoutRedeliveryBackoff;
+    }
+
+    public void setAckTimeoutRedeliveryBackoff(
+            RedeliveryBackoff ackTimeoutRedeliveryBackoff) {
+        this.ackTimeoutRedeliveryBackoff = ackTimeoutRedeliveryBackoff;
+    }
+
     public Boolean getAllowManualAcknowledgement() {
         return allowManualAcknowledgement;
     }
@@ -377,6 +397,15 @@ public class PulsarComponentConfiguration
         this.messageListener = messageListener;
     }
 
+    public RedeliveryBackoff getNegativeAckRedeliveryBackoff() {
+        return negativeAckRedeliveryBackoff;
+    }
+
+    public void setNegativeAckRedeliveryBackoff(
+            RedeliveryBackoff negativeAckRedeliveryBackoff) {
+        this.negativeAckRedeliveryBackoff = negativeAckRedeliveryBackoff;
+    }
+
     public Long getNegativeAckRedeliveryDelayMicros() {
         return negativeAckRedeliveryDelayMicros;
     }
diff --git a/components-starter/camel-pulsar-starter/src/main/java/org/apache/camel/component/pulsar/springboot/PulsarComponentConverter.java b/components-starter/camel-pulsar-starter/src/main/java/org/apache/camel/component/pulsar/springboot/PulsarComponentConverter.java
index 3f926cfcab8..da47516aed4 100644
--- a/components-starter/camel-pulsar-starter/src/main/java/org/apache/camel/component/pulsar/springboot/PulsarComponentConverter.java
+++ b/components-starter/camel-pulsar-starter/src/main/java/org/apache/camel/component/pulsar/springboot/PulsarComponentConverter.java
@@ -42,6 +42,7 @@ public class PulsarComponentConverter implements GenericConverter {
     public Set<ConvertiblePair> getConvertibleTypes() {
         Set<ConvertiblePair> answer = new LinkedHashSet<>();
         answer.add(new ConvertiblePair(String.class, org.apache.camel.component.pulsar.PulsarConfiguration.class));
+        answer.add(new ConvertiblePair(String.class, org.apache.pulsar.client.api.RedeliveryBackoff.class));
         answer.add(new ConvertiblePair(String.class, org.apache.camel.component.pulsar.PulsarMessageReceiptFactory.class));
         answer.add(new ConvertiblePair(String.class, org.apache.pulsar.client.api.BatcherBuilder.class));
         answer.add(new ConvertiblePair(String.class, org.apache.pulsar.client.api.MessageRouter.class));
@@ -64,6 +65,7 @@ public class PulsarComponentConverter implements GenericConverter {
         ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
         switch (targetType.getName()) {
             case "org.apache.camel.component.pulsar.PulsarConfiguration": return applicationContext.getBean(ref, org.apache.camel.component.pulsar.PulsarConfiguration.class);
+            case "org.apache.pulsar.client.api.RedeliveryBackoff": return applicationContext.getBean(ref, org.apache.pulsar.client.api.RedeliveryBackoff.class);
             case "org.apache.camel.component.pulsar.PulsarMessageReceiptFactory": return applicationContext.getBean(ref, org.apache.camel.component.pulsar.PulsarMessageReceiptFactory.class);
             case "org.apache.pulsar.client.api.BatcherBuilder": return applicationContext.getBean(ref, org.apache.pulsar.client.api.BatcherBuilder.class);
             case "org.apache.pulsar.client.api.MessageRouter": return applicationContext.getBean(ref, org.apache.pulsar.client.api.MessageRouter.class);