You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/03/16 19:13:09 UTC
[camel] 20/33: CAMEL-17792: Add doc about the message headers of camel-aws2-mq
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 66fb5a0061f8ccbb636459468ff37d6e97b0a705
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Wed Mar 16 12:01:21 2022 +0100
CAMEL-17792: Add doc about the message headers of camel-aws2-mq
---
.../apache/camel/component/aws2/mq/aws2-mq.json | 13 ++++++++++
.../src/main/docs/aws2-mq-component.adoc | 29 +++-------------------
.../camel/component/aws2/mq/MQ2Constants.java | 16 ++++++++++++
.../camel/component/aws2/mq/MQ2Endpoint.java | 2 +-
4 files changed, 33 insertions(+), 27 deletions(-)
diff --git a/components/camel-aws/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json b/components/camel-aws/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
index 7dbf031..cc6c7fb 100644
--- a/components/camel-aws/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
+++ b/components/camel-aws/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
@@ -39,6 +39,19 @@
"accessKey": { "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
"secretKey": { "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
},
+ "headers": {
+ "CamelAwsMQOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform" },
+ "CamelAwsMQMaxResults": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of results that must be retrieved from listBrokers operation" },
+ "CamelAwsMQBrokerName": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The broker name" },
+ "CamelAwsMQBrokerEngine": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Broker Engine for MQ." },
+ "CamelAwsMQBrokerEngineVersion": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Broker Engine Version for MQ. Currently you can choose between 5.15.6 and 5.15.0 of ACTIVEMQ" },
+ "CamelAwsMQBrokerID": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The broker id" },
+ "CamelAwsMQConfigurationID": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.mq.model.ConfigurationId", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A list of information about the configuration." },
+ "CamelAwsMQBrokerDeploymentMode": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The deployment mode for the broker in the createBroker operation" },
+ "CamelAwsMQBrokerInstanceType": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The instance type for the MQ machine in the createBroker operation" },
+ "CamelAwsMQBrokerUsers": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<User>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of users for MQ" },
+ "CamelAwsMQBrokerPubliclyAccessible": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "false", "description": "If the MQ instance must be publicly available or not." }
+ },
"properties": {
"label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Logical name" },
"amazonMqClient": { "kind": "parameter", "displayName": "Amazon Mq Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.mq.MqClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To use a existing configured AmazonMQClient as client" },
diff --git a/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc b/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
index ba4928b..f26d4ba 100644
--- a/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
+++ b/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
@@ -67,32 +67,9 @@ You have the possibility of avoiding the usage of explicit static credentials, b
For more information about this you can look at https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html[AWS credentials documentation]
-=== Message headers evaluated by the MQ producer
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Header |Type |Description
-
-|`CamelAwsMQMaxResults` |`String` |The number of results that must be retrieved from listBrokers operation
-
-|`CamelAwsMQBrokerName` |`String` |The broker name
-
-|`CamelAwsMQOperation` |`String` |The operation we want to perform
-
-|`CamelAwsMQBrokerId` |`String` |The broker id
-
-|`CamelAwsMQBrokerDeploymentMode` |`String` |The deployment mode for the broker in the createBroker operation
-
-|`CamelAwsMQBrokerInstanceType` |`String` |The instance type for the MQ machine in the createBroker operation
-
-|`CamelAwsMQBrokerEngine` |`String` |The Broker Engine for MQ. Default is ACTIVEMQ
-
-|`CamelAwsMQBrokerEngineVersion` |`String` |The Broker Engine Version for MQ. Currently you can choose between 5.15.6 and 5.15.0 of ACTIVEMQ
-
-|`CamelAwsMQBrokerUsers` |`List<User>` |The list of users for MQ
-
-|`CamelAwsMQBrokerPubliclyAccessible` |`Boolean` |If the MQ instance must be publicly available or not. Default is false.
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
=== MQ Producer operations
diff --git a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Constants.java b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Constants.java
index dac60ec..b668819 100644
--- a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Constants.java
+++ b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Constants.java
@@ -16,19 +16,35 @@
*/
package org.apache.camel.component.aws2.mq;
+import org.apache.camel.spi.Metadata;
+
/**
* Constants used in Camel AWS MQ module SDK v2
*/
public interface MQ2Constants {
+ @Metadata(description = "The operation we want to perform", javaType = "String")
String OPERATION = "CamelAwsMQOperation";
+ @Metadata(description = "The number of results that must be retrieved from listBrokers operation", javaType = "Integer")
String MAX_RESULTS = "CamelAwsMQMaxResults";
+ @Metadata(description = "The broker name", javaType = "String")
String BROKER_NAME = "CamelAwsMQBrokerName";
+ @Metadata(description = "The Broker Engine for MQ.", javaType = "String")
String BROKER_ENGINE = "CamelAwsMQBrokerEngine";
+ @Metadata(description = "The Broker Engine Version for MQ. Currently you can choose between 5.15.6 and 5.15.0 of ACTIVEMQ",
+ javaType = "String")
String BROKER_ENGINE_VERSION = "CamelAwsMQBrokerEngineVersion";
+ @Metadata(description = "The broker id", javaType = "String")
String BROKER_ID = "CamelAwsMQBrokerID";
+ @Metadata(description = "A list of information about the configuration.",
+ javaType = "software.amazon.awssdk.services.mq.model.ConfigurationId")
String CONFIGURATION_ID = "CamelAwsMQConfigurationID";
+ @Metadata(description = "The deployment mode for the broker in the createBroker operation", javaType = "String")
String BROKER_DEPLOYMENT_MODE = "CamelAwsMQBrokerDeploymentMode";
+ @Metadata(description = "The instance type for the MQ machine in the createBroker operation", javaType = "String")
String BROKER_INSTANCE_TYPE = "CamelAwsMQBrokerInstanceType";
+ @Metadata(description = "The list of users for MQ", javaType = "List<User>")
String BROKER_USERS = "CamelAwsMQBrokerUsers";
+ @Metadata(description = "If the MQ instance must be publicly available or not.", javaType = "Boolean",
+ defaultValue = "false")
String BROKER_PUBLICLY_ACCESSIBLE = "CamelAwsMQBrokerPubliclyAccessible";
}
diff --git a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java
index 7b1062b..33fd6c0 100644
--- a/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java
+++ b/components/camel-aws/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Endpoint.java
@@ -32,7 +32,7 @@ import software.amazon.awssdk.services.mq.MqClient;
* Manage AWS MQ instances using AWS SDK version 2.x.
*/
@UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-mq", title = "AWS MQ", syntax = "aws2-mq:label", producerOnly = true,
- category = { Category.CLOUD, Category.MESSAGING })
+ category = { Category.CLOUD, Category.MESSAGING }, headersClass = MQ2Constants.class)
public class MQ2Endpoint extends ScheduledPollEndpoint {
private MqClient mqClient;