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 2021/02/01 22:02:40 UTC
[camel] branch master updated (c6b9c12 -> 6829656)
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 c6b9c12 Regen for commit b01035854c6eb07131b7aefa4178459cfa5df93b
new 5440b14 ServiceKeys registry lookup and XML dsl - Related to CAMEL-16001
new 3a7ec68 Moving list of supported services and operations into a table for better presentation and extension in future service supports. related to CAMEL-16001
new 6829656 Service name corrections
The 3 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:
.../src/main/docs/hwcloud-smn-component.adoc | 70 ++++++++++++++++++++--
1 file changed, 64 insertions(+), 6 deletions(-)
[camel] 01/03: ServiceKeys registry lookup and XML dsl - Related to
CAMEL-16001
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 5440b1428e0ff8fb8f2999b312a184c4f102b923
Author: mathewsreji <co...@gmail.com>
AuthorDate: Mon Feb 1 14:39:35 2021 -0500
ServiceKeys registry lookup and XML dsl - Related to CAMEL-16001
---
.../src/main/docs/hwcloud-smn-component.adoc | 57 ++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc b/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
index 06bdc37..2051d32 100644
--- a/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
+++ b/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
@@ -136,7 +136,42 @@ with the following path and query parameters:
- 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,3 +182,25 @@ from("direct:triggerRoute")
.setProperty("CamelHwCloudSmnTemplateName", constant("hello-template"))
.to("hwcloud-smn:publishMessageService?operation=publishAsTextMessage&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")
+--------------------------------------------------------------------------------
[camel] 03/03: Service name corrections
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 68296560e52c6e47d5e8604bdcda5be351cc24cb
Author: mathewsreji <co...@gmail.com>
AuthorDate: Mon Feb 1 15:19:01 2021 -0500
Service name corrections
---
.../camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc b/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
index 8104d66..f6db10d 100644
--- a/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
+++ b/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
@@ -181,7 +181,7 @@ 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
[camel] 02/03: Moving list of supported services and operations
into a table for better presentation and extension in future service
supports. related to CAMEL-16001
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 3a7ec68e01d21175110709ddae96ce7df0d21226
Author: mathewsreji <co...@gmail.com>
AuthorDate: Mon Feb 1 14:48:41 2021 -0500
Moving list of supported services and operations into a table for better presentation and extension in future service supports. related to CAMEL-16001
Moving list of supported services and operations into a table - related to CAMEL-16001
---
.../src/main/docs/hwcloud-smn-component.adoc | 53 +++++++++++-----------
1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc b/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
index 2051d32..8104d66 100644
--- a/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
+++ b/components/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
@@ -126,17 +126,18 @@ 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
+== Inline Configuration of route
==== publishAsTextMessage
Java DSL
[source,java]
@@ -154,18 +155,18 @@ 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>
+ <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>
--------------------------------------------------------------------------------
@@ -191,16 +192,16 @@ 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>
+<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")
+ .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")
--------------------------------------------------------------------------------