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
The following commit(s) were added to refs/heads/master by this push: new 27bd260 Regen for commit 68296560e52c6e47d5e8604bdcda5be351cc24cb 27bd260 is described below commit 27bd260e8b702f8b41b50d4b1452e31bce713357 Author: oscerd <osc...@users.noreply.github.com> AuthorDate: Mon Feb 1 22:43:22 2021 +0000 Regen for commit 68296560e52c6e47d5e8604bdcda5be351cc24cb Signed-off-by: GitHub <nore...@github.com> --- .../camel/catalog/docs/hwcloud-smn-component.adoc | 70 ++++++++++++++++++++-- .../modules/ROOT/pages/hwcloud-smn-component.adoc | 70 ++++++++++++++++++++-- 2 files changed, 128 insertions(+), 12 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hwcloud-smn-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hwcloud-smn-component.adoc index 06bdc37..f6db10d 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hwcloud-smn-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hwcloud-smn-component.adoc @@ -126,17 +126,53 @@ with the following path and query parameters: |======================================================================= -== Supported smn services -- publishMessageService +== Supported list of smn services and corresponding operations +[width="100%",cols="50%,50%",options="header",] +|======================================================================= +|Service |Operations -== Supported smn operations +|`publishMessageService` | publishAsTextMessage, publishAsTemplatedMessage| +|======================================================================= -- publishAsTextMessage -- publishAsTemplatedMessage +== Inline Configuration of route +==== publishAsTextMessage +Java DSL +[source,java] +-------------------------------------------------------------------------------- +from("direct:triggerRoute") +.setProperty(SmnProperties.NOTIFICATION_SUBJECT, constant("Notification Subject")) +.setProperty(SmnProperties.NOTIFICATION_TOPIC_NAME,constant(testConfiguration.getProperty("topic"))) +.setProperty(SmnProperties.NOTIFICATION_TTL, constant(60)) +.to("hwcloud-smn:publishMessageService?operation=publishAsTextMessage&authKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4") +-------------------------------------------------------------------------------- + + + +XML DSL +[source,xml] +-------------------------------------------------------------------------------- +<route> + <from uri="direct:triggerRoute" /> + <setProperty name="CamelHwCloudSmnSubject"> + <constant>this is my subjectline</constant> + </setProperty> + <setProperty name="CamelHwCloudSmnTopic"> + <constant>reji-test</constant> + </setProperty> + <setProperty name="CamelHwCloudSmnMessageTtl"> + <constant>60</constant> + </setProperty> + <to uri="hwcloud-smn:publishMessageService?operation=publishAsTextMessage&authKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc&region=cn-north-4" /> +</route> +-------------------------------------------------------------------------------- + + +==== publishAsTemplatedMessage +Java DSL [source,java] -------------------------------------------------------------------------------- from("direct:triggerRoute") @@ -145,5 +181,27 @@ from("direct:triggerRoute") .setProperty("CamelHwCloudSmnMessageTtl", constant(60)) .setProperty("CamelHwCloudSmnTemplateTags", constant(tags)) .setProperty("CamelHwCloudSmnTemplateName", constant("hello-template")) -.to("hwcloud-smn:publishMessageService?operation=publishAsTextMessage&authKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4") +.to("hwcloud-smn:publishMessageService?operation=publishAsTemplatedMessage&authKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4") +-------------------------------------------------------------------------------- + +== Using ServiceKey configuration Bean +Authentication key and secret keys are required to authenticate against cloud smn service. You can avoid having them being exposed +and scattered over in your endpoint uri by wrapping them inside a bean of class ```org.apache.camel.component.huaweicloud.smn.models.ServiceKeys```. +Add it to the registry and let camel look it up by referring the object via endpoint query parameter ```serviceKeys```. +Check the following code snippets + +[source,xml] +---- +<bean id="myServiceKeyConfig" class="org.apache.camel.component.huaweicloud.smn.models.ServiceKeys"> + <property name="authenticationKey" value="your_auth_key" /> + <property name="secretKey" value="your_secret_key" /> +</bean> +---- +[source,java] +-------------------------------------------------------------------------------- +from("direct:triggerRoute") + .setProperty(SmnProperties.NOTIFICATION_SUBJECT, constant("Notification Subject")) + .setProperty(SmnProperties.NOTIFICATION_TOPIC_NAME,constant(testConfiguration.getProperty("topic"))) + .setProperty(SmnProperties.NOTIFICATION_TTL, constant(60)) + .to("hwcloud-smn:publishMessageService?operation=publishAsTextMessage&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4&serviceKeys=#myServiceKeyConfig") -------------------------------------------------------------------------------- diff --git a/docs/components/modules/ROOT/pages/hwcloud-smn-component.adoc b/docs/components/modules/ROOT/pages/hwcloud-smn-component.adoc index 66ac259..290b32b 100644 --- a/docs/components/modules/ROOT/pages/hwcloud-smn-component.adoc +++ b/docs/components/modules/ROOT/pages/hwcloud-smn-component.adoc @@ -128,17 +128,53 @@ with the following path and query parameters: |======================================================================= -== Supported smn services -- publishMessageService +== Supported list of smn services and corresponding operations +[width="100%",cols="50%,50%",options="header",] +|======================================================================= +|Service |Operations -== Supported smn operations +|`publishMessageService` | publishAsTextMessage, publishAsTemplatedMessage| +|======================================================================= -- publishAsTextMessage -- publishAsTemplatedMessage +== Inline Configuration of route +==== publishAsTextMessage +Java DSL +[source,java] +-------------------------------------------------------------------------------- +from("direct:triggerRoute") +.setProperty(SmnProperties.NOTIFICATION_SUBJECT, constant("Notification Subject")) +.setProperty(SmnProperties.NOTIFICATION_TOPIC_NAME,constant(testConfiguration.getProperty("topic"))) +.setProperty(SmnProperties.NOTIFICATION_TTL, constant(60)) +.to("hwcloud-smn:publishMessageService?operation=publishAsTextMessage&authKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4") +-------------------------------------------------------------------------------- + + + +XML DSL +[source,xml] +-------------------------------------------------------------------------------- +<route> + <from uri="direct:triggerRoute" /> + <setProperty name="CamelHwCloudSmnSubject"> + <constant>this is my subjectline</constant> + </setProperty> + <setProperty name="CamelHwCloudSmnTopic"> + <constant>reji-test</constant> + </setProperty> + <setProperty name="CamelHwCloudSmnMessageTtl"> + <constant>60</constant> + </setProperty> + <to uri="hwcloud-smn:publishMessageService?operation=publishAsTextMessage&authKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc&region=cn-north-4" /> +</route> +-------------------------------------------------------------------------------- + + +==== publishAsTemplatedMessage +Java DSL [source,java] -------------------------------------------------------------------------------- from("direct:triggerRoute") @@ -147,5 +183,27 @@ from("direct:triggerRoute") .setProperty("CamelHwCloudSmnMessageTtl", constant(60)) .setProperty("CamelHwCloudSmnTemplateTags", constant(tags)) .setProperty("CamelHwCloudSmnTemplateName", constant("hello-template")) -.to("hwcloud-smn:publishMessageService?operation=publishAsTextMessage&authKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4") +.to("hwcloud-smn:publishMessageService?operation=publishAsTemplatedMessage&authKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4") +-------------------------------------------------------------------------------- + +== Using ServiceKey configuration Bean +Authentication key and secret keys are required to authenticate against cloud smn service. You can avoid having them being exposed +and scattered over in your endpoint uri by wrapping them inside a bean of class ```org.apache.camel.component.huaweicloud.smn.models.ServiceKeys```. +Add it to the registry and let camel look it up by referring the object via endpoint query parameter ```serviceKeys```. +Check the following code snippets + +[source,xml] +---- +<bean id="myServiceKeyConfig" class="org.apache.camel.component.huaweicloud.smn.models.ServiceKeys"> + <property name="authenticationKey" value="your_auth_key" /> + <property name="secretKey" value="your_secret_key" /> +</bean> +---- +[source,java] +-------------------------------------------------------------------------------- +from("direct:triggerRoute") + .setProperty(SmnProperties.NOTIFICATION_SUBJECT, constant("Notification Subject")) + .setProperty(SmnProperties.NOTIFICATION_TOPIC_NAME,constant(testConfiguration.getProperty("topic"))) + .setProperty(SmnProperties.NOTIFICATION_TTL, constant(60)) + .to("hwcloud-smn:publishMessageService?operation=publishAsTextMessage&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4&serviceKeys=#myServiceKeyConfig") --------------------------------------------------------------------------------