You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/07/30 09:32:15 UTC
[camel] branch master updated (7a87e24 -> db30689)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 7a87e24 Polished
new deb8f28 CAMEL-15352 - Camel-AWS2-SQS: Add support for purgequeue operation
new 438a6c6 CAMEL-15352 - Added test
new 2034a24 Regen docs
new 960b220 More modification to archetype docs
new 270ca12 Camel-AWS2-SQS: Fixed CS
new 702736f Regen docs
new db30689 Regen catalog
The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/camel/catalog/components/aws2-sqs.json | 4 ++--
.../org/apache/camel/catalog/docs/aws2-sqs-component.adoc | 4 ++--
.../org/apache/camel/component/aws2/sqs/aws2-sqs.json | 4 ++--
.../camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc | 4 ++--
.../apache/camel/component/aws2/sqs/Sqs2Operations.java | 2 +-
.../org/apache/camel/component/aws2/sqs/Sqs2Producer.java | 15 +++++++++++++++
.../camel/component/aws2/sqs/AmazonSQSClientMock.java | 7 +++++++
...sProducerDeleteTest.java => SqsProducerPurgeTest.java} | 11 +++++------
.../builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java | 3 ++-
.../components/modules/ROOT/pages/aws2-sqs-component.adoc | 4 ++--
10 files changed, 40 insertions(+), 18 deletions(-)
copy components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/{SqsProducerDeleteTest.java => SqsProducerPurgeTest.java} (82%)
[camel] 07/07: Regen catalog
Posted by ac...@apache.org.
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.git
commit db306890391c8f0c29312a60cc055feb784247be
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 30 11:31:22 2020 +0200
Regen catalog
---
.../resources/org/apache/camel/catalog/components/aws2-sqs.json | 4 ++--
.../resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json
index d5d8d8a..a7864cf 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-sqs.json
@@ -48,7 +48,7 @@
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
"messageDeduplicationIdStrategy": { "kind": "property", "displayName": "Message Deduplication Id Strategy", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "useExchangeId", "useContentBasedDeduplication" ], "deprecated": false, "secret": false, "defaultValue": "useExchangeId", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Onl [...]
"messageGroupIdStrategy": { "kind": "property", "displayName": "Message Group Id Strategy", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "useConstant", "useExchangeId", "usePropertyValue" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Only for FIFO queues. Strategy for setting the me [...]
- "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Operations", "enum": [ "sendBatchMessage", "deleteMessage", "listQueues" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The operation to do in case the user don't wa [...]
+ "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Operations", "enum": [ "sendBatchMessage", "deleteMessage", "listQueues", "purgeQueue" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The operation to do in case the [...]
"basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
"delayQueue": { "kind": "property", "displayName": "Delay Queue", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Define if you want to apply delaySeconds option to the queue or on single messages" },
"queueUrl": { "kind": "property", "displayName": "Queue Url", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used [...]
@@ -96,7 +96,7 @@
"lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the [...]
"messageDeduplicationIdStrategy": { "kind": "parameter", "displayName": "Message Deduplication Id Strategy", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "useExchangeId", "useContentBasedDeduplication" ], "deprecated": false, "secret": false, "defaultValue": "useExchangeId", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "On [...]
"messageGroupIdStrategy": { "kind": "parameter", "displayName": "Message Group Id Strategy", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "useConstant", "useExchangeId", "usePropertyValue" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Only for FIFO queues. Strategy for setting the m [...]
- "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Operations", "enum": [ "sendBatchMessage", "deleteMessage", "listQueues" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The operation to do in case the user don't w [...]
+ "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Operations", "enum": [ "sendBatchMessage", "deleteMessage", "listQueues", "purgeQueue" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The operation to do in case th [...]
"basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
"delayQueue": { "kind": "parameter", "displayName": "Delay Queue", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Define if you want to apply delaySeconds option to the queue or on single messages" },
"queueUrl": { "kind": "parameter", "displayName": "Queue Url", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be use [...]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc
index c358871..40693c5 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sqs-component.adoc
@@ -76,7 +76,7 @@ The AWS 2 Simple Queue Service (SQS) component supports 40 options, which are li
| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
| *messageDeduplicationIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. Can be one of the following options: useExchangeId, useContentBasedDeduplication. For the useContentBasedDeduplication option, no messageDeduplicationId will be set on the message. The value can be one of: useExchangeId, useContentBasedDeduplication | useExchangeId | String
| *messageGroupIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used. The value can be one of: useConstant, useExchangeId, usePropertyValue | | String
-| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues | | Sqs2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues, purgeQueue | | Sqs2Operations
| *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
| *delayQueue* (advanced) | Define if you want to apply delaySeconds option to the queue or on single messages | false | boolean
| *queueUrl* (advanced) | To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used, to connect to a mock implementation of SQS, for testing purposes. | | String
@@ -156,7 +156,7 @@ with the following path and query parameters:
| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
| *messageDeduplicationIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. Can be one of the following options: useExchangeId, useContentBasedDeduplication. For the useContentBasedDeduplication option, no messageDeduplicationId will be set on the message. The value can be one of: useExchangeId, useContentBasedDeduplication | useExchangeId | String
| *messageGroupIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used. The value can be one of: useConstant, useExchangeId, usePropertyValue | | String
-| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues | | Sqs2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues, purgeQueue | | Sqs2Operations
| *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
| *delayQueue* (advanced) | Define if you want to apply delaySeconds option to the queue or on single messages | false | boolean
| *queueUrl* (advanced) | To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used, to connect to a mock implementation of SQS, for testing purposes. | | String
[camel] 02/07: CAMEL-15352 - Added test
Posted by ac...@apache.org.
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.git
commit 438a6c67efd24fb661a48eac9ef0b893be08f3c3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 30 11:25:46 2020 +0200
CAMEL-15352 - Added test
---
.../component/aws2/sqs/SqsProducerPurgeTest.java | 68 ++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java
new file mode 100644
index 0000000..22971f1
--- /dev/null
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws2.sqs;
+
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.sqs.model.PurgeQueueResponse;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class SqsProducerPurgeTest extends CamelTestSupport {
+
+ @BindToRegistry("client")
+ AmazonSQSClientMock mock = new AmazonSQSClientMock();
+
+ @EndpointInject("direct:start")
+ private ProducerTemplate template;
+
+ @EndpointInject("mock:result")
+ private MockEndpoint result;
+
+ @Test
+ public void purgeQueue() throws Exception {
+ result.expectedMessageCount(1);
+
+ template.send("direct:start", new Processor() {
+
+ @Override
+ public void process(Exchange exchange) throws Exception {
+ }
+ });
+ assertMockEndpointsSatisfied();
+ PurgeQueueResponse res = result.getExchanges().get(0).getIn().getBody(PurgeQueueResponse.class);
+ assertNotNull(res);
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("direct:start").to("aws2-sqs://camel-1?amazonSQSClient=#client&operation=purgeQueue").to("mock:result");
+ }
+ };
+ }
+
+}
[camel] 03/07: Regen docs
Posted by ac...@apache.org.
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.git
commit 2034a244f6a5a80435f6906f8c38b31a128f096a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 30 11:26:41 2020 +0200
Regen docs
---
.../resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json | 4 ++--
components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc | 4 ++--
.../apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java | 3 ++-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/components/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json b/components/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json
index d5d8d8a..a7864cf 100644
--- a/components/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json
+++ b/components/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json
@@ -48,7 +48,7 @@
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
"messageDeduplicationIdStrategy": { "kind": "property", "displayName": "Message Deduplication Id Strategy", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "useExchangeId", "useContentBasedDeduplication" ], "deprecated": false, "secret": false, "defaultValue": "useExchangeId", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Onl [...]
"messageGroupIdStrategy": { "kind": "property", "displayName": "Message Group Id Strategy", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "useConstant", "useExchangeId", "usePropertyValue" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Only for FIFO queues. Strategy for setting the me [...]
- "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Operations", "enum": [ "sendBatchMessage", "deleteMessage", "listQueues" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The operation to do in case the user don't wa [...]
+ "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Operations", "enum": [ "sendBatchMessage", "deleteMessage", "listQueues", "purgeQueue" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The operation to do in case the [...]
"basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
"delayQueue": { "kind": "property", "displayName": "Delay Queue", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Define if you want to apply delaySeconds option to the queue or on single messages" },
"queueUrl": { "kind": "property", "displayName": "Queue Url", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used [...]
@@ -96,7 +96,7 @@
"lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the [...]
"messageDeduplicationIdStrategy": { "kind": "parameter", "displayName": "Message Deduplication Id Strategy", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "useExchangeId", "useContentBasedDeduplication" ], "deprecated": false, "secret": false, "defaultValue": "useExchangeId", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "On [...]
"messageGroupIdStrategy": { "kind": "parameter", "displayName": "Message Group Id Strategy", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "useConstant", "useExchangeId", "usePropertyValue" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Only for FIFO queues. Strategy for setting the m [...]
- "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Operations", "enum": [ "sendBatchMessage", "deleteMessage", "listQueues" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The operation to do in case the user don't w [...]
+ "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Operations", "enum": [ "sendBatchMessage", "deleteMessage", "listQueues", "purgeQueue" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The operation to do in case th [...]
"basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
"delayQueue": { "kind": "parameter", "displayName": "Delay Queue", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Define if you want to apply delaySeconds option to the queue or on single messages" },
"queueUrl": { "kind": "parameter", "displayName": "Queue Url", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be use [...]
diff --git a/components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc b/components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
index c358871..40693c5 100644
--- a/components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
+++ b/components/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
@@ -76,7 +76,7 @@ The AWS 2 Simple Queue Service (SQS) component supports 40 options, which are li
| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
| *messageDeduplicationIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. Can be one of the following options: useExchangeId, useContentBasedDeduplication. For the useContentBasedDeduplication option, no messageDeduplicationId will be set on the message. The value can be one of: useExchangeId, useContentBasedDeduplication | useExchangeId | String
| *messageGroupIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used. The value can be one of: useConstant, useExchangeId, usePropertyValue | | String
-| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues | | Sqs2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues, purgeQueue | | Sqs2Operations
| *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
| *delayQueue* (advanced) | Define if you want to apply delaySeconds option to the queue or on single messages | false | boolean
| *queueUrl* (advanced) | To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used, to connect to a mock implementation of SQS, for testing purposes. | | String
@@ -156,7 +156,7 @@ with the following path and query parameters:
| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
| *messageDeduplicationIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. Can be one of the following options: useExchangeId, useContentBasedDeduplication. For the useContentBasedDeduplication option, no messageDeduplicationId will be set on the message. The value can be one of: useExchangeId, useContentBasedDeduplication | useExchangeId | String
| *messageGroupIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used. The value can be one of: useConstant, useExchangeId, usePropertyValue | | String
-| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues | | Sqs2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues, purgeQueue | | Sqs2Operations
| *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
| *delayQueue* (advanced) | Define if you want to apply delaySeconds option to the queue or on single messages | false | boolean
| *queueUrl* (advanced) | To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used, to connect to a mock implementation of SQS, for testing purposes. | | String
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java
index 7e16ed7..db2a0b4 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Sqs2EndpointBuilderFactory.java
@@ -2543,7 +2543,8 @@ public interface Sqs2EndpointBuilderFactory {
enum Sqs2Operations {
sendBatchMessage,
deleteMessage,
- listQueues;
+ listQueues,
+ purgeQueue;
}
public interface Sqs2Builders {
[camel] 04/07: More modification to archetype docs
Posted by ac...@apache.org.
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.git
commit 960b220e3c5ae9f8adf6f7538dffdd124e577f99
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 30 11:26:58 2020 +0200
More modification to archetype docs
---
docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc | 4 ----
1 file changed, 4 deletions(-)
diff --git a/docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc b/docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc
index 20f821c..b543188 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc
@@ -70,10 +70,6 @@ mvn archetype:generate \
-DarchetypeVersion=3.5.0-SNAPSHOT
----
-Notice that archetypes will now be downloaded from
-https://repository.apache.org/content/groups/snapshots-group[Apache's
-snapshot repo] instead of https://repo1.maven.org/maven2[Maven central].
-
When the project is created, you may need to add another repository to
the pom.xml file. This is to load a SNAPSHOT version of the
camel-maven-plugin
[camel] 05/07: Camel-AWS2-SQS: Fixed CS
Posted by ac...@apache.org.
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.git
commit 270ca12242c0c1a45153653f44423e00176f1431
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 30 11:29:06 2020 +0200
Camel-AWS2-SQS: Fixed CS
---
.../java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java | 2 +-
.../apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java
index 2a4c4e1..5aa1950 100644
--- a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java
+++ b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java
@@ -83,7 +83,7 @@ public class Sqs2Producer extends DefaultProducer {
listQueues(getClient(), exchange);
break;
case purgeQueue:
- purgeQueue(getClient(), exchange);
+ purgeQueue(getClient(), exchange);
break;
default:
throw new IllegalArgumentException("Unsupported operation");
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java
index 22971f1..7604311 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java
@@ -45,11 +45,11 @@ public class SqsProducerPurgeTest extends CamelTestSupport {
result.expectedMessageCount(1);
template.send("direct:start", new Processor() {
-
- @Override
- public void process(Exchange exchange) throws Exception {
- }
- });
+
+ @Override
+ public void process(Exchange exchange) throws Exception {
+ }
+ });
assertMockEndpointsSatisfied();
PurgeQueueResponse res = result.getExchanges().get(0).getIn().getBody(PurgeQueueResponse.class);
assertNotNull(res);
[camel] 06/07: Regen docs
Posted by ac...@apache.org.
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.git
commit 702736fc42eefe36cedad78bbddd6c9652f3c156
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 30 11:29:38 2020 +0200
Regen docs
---
docs/components/modules/ROOT/pages/aws2-sqs-component.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/components/modules/ROOT/pages/aws2-sqs-component.adoc b/docs/components/modules/ROOT/pages/aws2-sqs-component.adoc
index a60fc28..61ce33c 100644
--- a/docs/components/modules/ROOT/pages/aws2-sqs-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-sqs-component.adoc
@@ -78,7 +78,7 @@ The AWS 2 Simple Queue Service (SQS) component supports 40 options, which are li
| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
| *messageDeduplicationIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. Can be one of the following options: useExchangeId, useContentBasedDeduplication. For the useContentBasedDeduplication option, no messageDeduplicationId will be set on the message. The value can be one of: useExchangeId, useContentBasedDeduplication | useExchangeId | String
| *messageGroupIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used. The value can be one of: useConstant, useExchangeId, usePropertyValue | | String
-| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues | | Sqs2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues, purgeQueue | | Sqs2Operations
| *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
| *delayQueue* (advanced) | Define if you want to apply delaySeconds option to the queue or on single messages | false | boolean
| *queueUrl* (advanced) | To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used, to connect to a mock implementation of SQS, for testing purposes. | | String
@@ -158,7 +158,7 @@ with the following path and query parameters:
| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
| *messageDeduplicationIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. Can be one of the following options: useExchangeId, useContentBasedDeduplication. For the useContentBasedDeduplication option, no messageDeduplicationId will be set on the message. The value can be one of: useExchangeId, useContentBasedDeduplication | useExchangeId | String
| *messageGroupIdStrategy* (producer) | Only for FIFO queues. Strategy for setting the messageGroupId on the message. Can be one of the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, the value of property CamelAwsMessageGroupId will be used. The value can be one of: useConstant, useExchangeId, usePropertyValue | | String
-| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues | | Sqs2Operations
+| *operation* (producer) | The operation to do in case the user don't want to send only a message. The value can be one of: sendBatchMessage, deleteMessage, listQueues, purgeQueue | | Sqs2Operations
| *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
| *delayQueue* (advanced) | Define if you want to apply delaySeconds option to the queue or on single messages | false | boolean
| *queueUrl* (advanced) | To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, are ignored. This parameter is intended to be used, to connect to a mock implementation of SQS, for testing purposes. | | String
[camel] 01/07: CAMEL-15352 - Camel-AWS2-SQS: Add support for
purgequeue operation
Posted by ac...@apache.org.
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.git
commit deb8f287ad541fbf676b9be4dec63ecc5fc8348f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 30 11:25:08 2020 +0200
CAMEL-15352 - Camel-AWS2-SQS: Add support for purgequeue operation
---
.../apache/camel/component/aws2/sqs/Sqs2Operations.java | 2 +-
.../org/apache/camel/component/aws2/sqs/Sqs2Producer.java | 15 +++++++++++++++
.../camel/component/aws2/sqs/AmazonSQSClientMock.java | 7 +++++++
.../modules/ROOT/pages/camel-maven-archetypes.adoc | 4 ++++
4 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Operations.java b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Operations.java
index b066531..0abc19a 100644
--- a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Operations.java
+++ b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Operations.java
@@ -18,5 +18,5 @@ package org.apache.camel.component.aws2.sqs;
public enum Sqs2Operations {
- sendBatchMessage, deleteMessage, listQueues
+ sendBatchMessage, deleteMessage, listQueues, purgeQueue
}
diff --git a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java
index f7d3c49..2a4c4e1 100644
--- a/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java
+++ b/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Producer.java
@@ -41,6 +41,8 @@ import software.amazon.awssdk.services.sqs.model.DeleteMessageResponse;
import software.amazon.awssdk.services.sqs.model.ListQueuesRequest;
import software.amazon.awssdk.services.sqs.model.ListQueuesResponse;
import software.amazon.awssdk.services.sqs.model.MessageAttributeValue;
+import software.amazon.awssdk.services.sqs.model.PurgeQueueRequest;
+import software.amazon.awssdk.services.sqs.model.PurgeQueueResponse;
import software.amazon.awssdk.services.sqs.model.SendMessageBatchRequest;
import software.amazon.awssdk.services.sqs.model.SendMessageBatchRequestEntry;
import software.amazon.awssdk.services.sqs.model.SendMessageBatchResponse;
@@ -80,6 +82,9 @@ public class Sqs2Producer extends DefaultProducer {
case listQueues:
listQueues(getClient(), exchange);
break;
+ case purgeQueue:
+ purgeQueue(getClient(), exchange);
+ break;
default:
throw new IllegalArgumentException("Unsupported operation");
}
@@ -153,6 +158,16 @@ public class Sqs2Producer extends DefaultProducer {
Message message = getMessageForResponse(exchange);
message.setBody(result);
}
+
+ private void purgeQueue(SqsClient amazonSQS, Exchange exchange) {
+ PurgeQueueRequest.Builder request = PurgeQueueRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Sqs2Constants.SQS_QUEUE_PREFIX))) {
+ request.queueUrl(getQueueUrl());
+ }
+ PurgeQueueResponse result = amazonSQS.purgeQueue(request.build());
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
private void configureFifoAttributes(SendMessageRequest.Builder request, Exchange exchange) {
if (getEndpoint().getConfiguration().isFifoQueue()) {
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/AmazonSQSClientMock.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/AmazonSQSClientMock.java
index 8791bcb..70d48c1 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/AmazonSQSClientMock.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/AmazonSQSClientMock.java
@@ -39,6 +39,8 @@ import software.amazon.awssdk.services.sqs.model.DeleteMessageResponse;
import software.amazon.awssdk.services.sqs.model.ListQueuesRequest;
import software.amazon.awssdk.services.sqs.model.ListQueuesResponse;
import software.amazon.awssdk.services.sqs.model.Message;
+import software.amazon.awssdk.services.sqs.model.PurgeQueueRequest;
+import software.amazon.awssdk.services.sqs.model.PurgeQueueResponse;
import software.amazon.awssdk.services.sqs.model.ReceiveMessageRequest;
import software.amazon.awssdk.services.sqs.model.ReceiveMessageResponse;
import software.amazon.awssdk.services.sqs.model.SendMessageBatchRequest;
@@ -169,6 +171,11 @@ public class AmazonSQSClientMock implements SqsClient {
}
return DeleteMessageResponse.builder().build();
}
+
+ @Override
+ public PurgeQueueResponse purgeQueue(PurgeQueueRequest purgeQueueRequest) {
+ return PurgeQueueResponse.builder().build();
+ }
@Override
public SetQueueAttributesResponse setQueueAttributes(SetQueueAttributesRequest setQueueAttributesRequest) {
diff --git a/docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc b/docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc
index b543188..20f821c 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-maven-archetypes.adoc
@@ -70,6 +70,10 @@ mvn archetype:generate \
-DarchetypeVersion=3.5.0-SNAPSHOT
----
+Notice that archetypes will now be downloaded from
+https://repository.apache.org/content/groups/snapshots-group[Apache's
+snapshot repo] instead of https://repo1.maven.org/maven2[Maven central].
+
When the project is created, you may need to add another repository to
the pom.xml file. This is to load a SNAPSHOT version of the
camel-maven-plugin