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 <[email protected]> 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[]
