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/09/01 06:41:19 UTC
[camel] 02/02: CAMEL-16849 - Add at least one example for component
in docs - Camel-ActiveMQ
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 362402a2470c088e517d422ad0566df33afd0c80
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 1 08:40:44 2021 +0200
CAMEL-16849 - Add at least one example for component in docs - Camel-ActiveMQ
---
.../modules/ROOT/pages/activemq-component.adoc | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/docs/components/modules/ROOT/pages/activemq-component.adoc b/docs/components/modules/ROOT/pages/activemq-component.adoc
index eb6071c..eed541d 100644
--- a/docs/components/modules/ROOT/pages/activemq-component.adoc
+++ b/docs/components/modules/ROOT/pages/activemq-component.adoc
@@ -329,5 +329,26 @@ with the following path and query parameters:
|===
// endpoint options: END
+== Examples
+
+You'll need to provide a connectioFactory to the ActiveMQ Component, to have the following examples working.
+
+=== Producer Example
+
+[source,java]
+--------------------------------------------------------------------------------
+from("timer:mytimer?period=5000")
+ .setBody(constant("HELLO from Camel!"))
+ .to("jms:queue:HELLO.WORLD");
+--------------------------------------------------------------------------------
+
+=== Consumer Example
+
+[source,java]
+--------------------------------------------------------------------------------
+from("jms:queue:HELLO.WORLD")
+ .log("Received a message - ${body}");
+--------------------------------------------------------------------------------
+
include::{page-component-version}@camel-spring-boot::page$activemq-starter.adoc[]