In the blog, we will learn how to embeds Apache ActiveMQ together with Apache Camel in Apache Karaf.
High level techlogies are being used in this tutorial.
Red Hat JBoss Fuse ESB - 6.3.0.redhat-187
Red Hat JBoss Developer Studio - 11.3.0.GA
Apache Camel - 2.17.0.redhat-630187
ActiveMQ - 5.11.0.redhat-630187
OSGI Blueprint DSL
1. Select "File" -> Choose "New Fuse Integration Project" -> Choose a "Project Name" -> Click on "Next".
2. Select "Standlone" as deployment platform and Select runtime under "Karaf/fuse on Karaf" button.
3. Click on "Next".
4. Under Advance Project Setup you may choose "Empty Blueprint DSL" and click on "Finish".
Application structure would be like this.
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.the.basic.tech.info</groupId>
<artifactId>camel-activemq-blueprint</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Fuse AMQ Quickstart - Blueprint</name>
<description>Camel AMQ Example using Blueprint</description>
<properties>
<maven-bundle-plugin.version>3.2.0</maven-bundle-plugin.version>
<jboss.fuse.bom.version>6.3.0.redhat-187</jboss.fuse.bom.version>
<java.version>1.8</java.version>
<maven-resources-plugin.version>3.0.1</maven-resources-plugin.version>
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
<maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<camel.version>2.17.0.redhat-630187</camel.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.fuse.bom</groupId>
<artifactId>jboss-fuse-parent</artifactId>
<version>${jboss.fuse.bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-kahadb-store</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-blueprint</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>org.apache.felix.fileinstall</artifactId>
<groupId>org.apache.felix</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>release.fusesource.org</id>
<name>FuseSource Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/repositories/releases</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>ea.fusesource.org</id>
<name>FuseSource Community Early Access Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>red-hat-ga-repository</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>release.fusesource.org</id>
<name>FuseSource Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/repositories/releases</url>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>ea.fusesource.org</id>
<name>FuseSource Community Early Access Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>red-hat-ga-repository</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga</url>
</pluginRepository>
</pluginRepositories>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven-bundle-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>fuse-apache-camel-integration</Bundle-SymbolicName>
<Bundle-Name>Camel AMQ Example using Blueprint [fuse-apache-camel-integration]</Bundle-Name></instructions></configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${camel.version}</version>
<configuration>
<useBlueprint>true</useBlueprint>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<configuration>
<filesets>
<fileset>
<directory>work</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</project>
Create a properties file named camel.activemq.blueprint.cfg in etc folder of Red Hat Fuse containing ActiveMQ connection options, i.e :
broker.url=tcp://localhost:61616
broker.username=admin
broker.password=admin
Blueprint: A blueprint is a dependency injection framework for OSGi bundles
Note: You may move <bean>………</bean> from camel-context.xml in a separate file named beans.xml and place it in parallel to camel-blueprint.xml under /OSGI-INF/blueprint/ directory.
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0" xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<cm:property-placeholder id="camel.activemq.blueprint" persistent-id="camel.activemq.blueprint">
<cm:default-properties>
<cm:property name="broker.url" value="vm://amq?broker.persistent=false" />
<cm:property name="broker.username" value="" />
<cm:property name="broker.password" value="" />
</cm:default-properties>
</cm:property-placeholder>
<bean class="com.the.basic.tech.info.camel.activemq.OrderGenerator" id="orderGenerator" />
<!-- Lets connect the Camel ActiveMQ component to the broker. -->
<bean class="org.apache.activemq.ActiveMQConnectionFactory" id="activemq-connection-factory">
<property name="brokerURL" value="${broker.url}" />
<property name="userName" value="${broker.username}" />
<property name="password" value="${broker.password}" />
</bean>
<bean class="org.apache.activemq.camel.component.ActiveMQComponent" id="activemq">
<property name="configuration">
<bean class="org.apache.activemq.camel.component.ActiveMQConfiguration">
<property name="connectionFactory" ref="activemq-connection-factory" />
</bean>
</property>
</bean>
<camelContext id="amq-example-context" xmlns="http://camel.apache.org/schema/blueprint" xmlns:order="http://com.mycompany/examples/order">
<!-- a route to generate a random order every 5th second -->
<route id="generate-order">
<from id="timerToGenerateOrder" uri="timer:order?period=5000&delay=2000&fixedRate=true" />
<bean id="generateOrder" method="generateOrder" ref="orderGenerator" />
<setHeader headerName="Exchange.FILE_NAME" id="updateFileNameHeader">
<method method="generateFileName" ref="orderGenerator" />
</setHeader>
<to id="initializerFolder" uri="file:work/in" />
</route>
<!-- When this route is started, it will automatically create the work/jms/input directory where you can drop thefile that need to be processed. The <log/> elements are used to add human-friendly business logging statements. They make it easier to see what the route is doing. Files that are consumed from the work/jms/input directory, are then sent to the JMS queue incomingOrders on the ActiveMQ broker. -->
<route id="file-to-jms-route">
<from id="incomingFolder" uri="file:work/in" />
<log id="logReceivingOrder" message="Receiving order ${file:name}" />
<to id="sendIncomingOrder" uri="activemq:incomingOrders" />
</route>
<!-- This route consumes messages from the JMS queue incomingOrders on the ActiveMQ broker within the ESB. The <choice/> element contains the content based router. The two <when/> clauses use XPath to define the criteria for entering that part of the route. When the country in the XML message is set to UK or US, the file will be moved to a directory for that country. The <otherwise/> element ensures that any file that does not meet the requirements for either of the <when/> elements will be moved to the work/jms/output/others directory. -->
<route id="jms-cbr-route" streamCache="true">
<from id="listenToIncomingOrder" uri="activemq:incomingOrders" />
<choice id="countrySelection">
<when id="UKCustomer">
<xpath id="_xpath1">/order:order/order:customer/order:country = 'UK'</xpath>
<log id="logUK" message="Sending order ${file:name} to the UK" />
<to id="outputUKFolder" uri="file:work/out/uk" />
</when>
<when id="USCustomer">
<xpath id="_xpath2">/order:order/order:customer/order:country = 'US'</xpath>
<log id="logUS" message="Sending order ${file:name} to the US" />
<to id="outputUSFolder" uri="file:work/out/us" />
</when>
<otherwise id="OtherCustomer">
<log id="logOtherCountry" message="Sending order ${file:name} to another country" />
<to id="outputOtherCountryFolder" uri="file:work/out/others" />
</otherwise>
</choice>
<log id="logEndProcessing" message="Done processing ${file:name}" />
</route>
</camelContext>
</blueprint>
A custom bean/class need to be added for generating the random orders. You can see reference of this class in camel-context blueprint DSL. E.g. <bean class="com.the.basic.tech.info.camel.activemq.OrderGenerator" id="orderGenerator" />
package com.the.basic.tech.info.camel.activemq;
import java.io.InputStream;
import java.util.Random;
import org.apache.camel.CamelContext;
/**
* To generate the random orders
*/
public class OrderGenerator {
private int count = 1;
private Random random = new Random();
public InputStream generateOrder(CamelContext camelContext) {
int number = random.nextInt(5) + 1;
String name = "data/order" + number + ".xml";
return generateOrderWithFileName(camelContext, name);
}
public InputStream generateOrderWithFileName(CamelContext camelContext, String name) {
return camelContext.getClassResolver().loadResourceAsStream(name);
}
public String generateFileName() {
return "order" + count++ + ".xml";
}
}
For testing the camel routes, following test data (order1.xml, order2.xml, oder3.xml, order4.xml and order5.xml) need to be put under data folder of the application. In this tutorial we are using Content-Based Route for filter and routing the request on the basis of Content.
order1.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<order xmlns="http://com.mycompany/examples/order">
<customer id="A0001">
<name>Antwerp Zoo</name>
<city>Antwerp</city>
<country>BE</country>
</customer>
<date>2021-05-01</date>
<orderlines>
<orderline>
<article id="A0001">
<description>Aardvark</description>
</article>
<quantity>1</quantity>
</orderline>
<orderline>
<article id="A0011">
<description>Alpaca</description>
</article>
<quantity>10</quantity>
</orderline>
</orderlines>
</order>
order2.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<order xmlns="http://com.mycompany/examples/order">
<customer id="B0002">
<name>Bristol Zoo Gardens</name>
<city>Bristol</city>
<country>UK</country>
</customer>
<date>2021-05-02</date>
<orderlines>
<orderline>
<article id="B0002">
<description>Badger</description>
</article>
<quantity>2</quantity>
</orderline>
<orderline>
<article id="B0202">
<description>Bee</description>
</article>
<quantity>200</quantity>
</orderline>
</orderlines>
</order>
order3.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<order xmlns="http://com.mycompany/examples/order">
<customer id="C0003">
<name>Columbus Zoo and Aquarium</name>
<city>Columbus</city>
<country>US</country>
</customer>
<date>2021-05-03</date>
<orderlines>
<orderline>
<article id="C0003">
<description>Camel</description>
</article>
<quantity>100</quantity>
</orderline>
<orderline>
<article id="C0333">
<description>Crocodile</description>
</article>
<quantity>1</quantity>
</orderline>
</orderlines>
</order>
order4.xml
<customer id="D0004">
<name>Dartmoor Zoological Park</name>
<city>Devon</city>
<country>UK</country>
</customer>
<date>2021-05-04</date>
<orderlines>
<orderline>
<article id="D0040">
<description>Dinosaur</description>
</article>
<quantity>4</quantity>
</orderline>
<orderline>
<article id="D0400">
<description>Dragonfly</description>
</article>
<quantity>40</quantity>
</orderline>
</orderlines>
order5.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<order xmlns="http://com.mycompany/examples/order">
<customer id="E0004">
<name>Erie Zoo</name>
<city>Erie</city>
<country>US</country>
</customer>
<date>2021-05-05</date>
<orderlines>
<orderline>
<article id="E0500">
<description>Elk</description>
</article>
<quantity>50</quantity>
</orderline>
<orderline>
<article id="E0005">
<description>Elephant</description>
</article>
<quantity>5</quantity>
</orderline>
</orderlines>
</order>
CamelBlueprintTestSupport class needs to be extended like this for testing the Camel Routes. Here, we need to mock all the endpoints. E.g.
package com.the.basic.tech.info.camel.activemq;
import org.apache.camel.EndpointInject;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
import org.junit.Test;
import com.the.basic.tech.info.camel.activemq.OrderGenerator;
/**
* A unit test to verify the Camel route works as designed.
*/
public class ActiveMQBlueprintTest extends CamelBlueprintTestSupport {
@EndpointInject(uri = "activemq:incomingOrders?username=${broker.userName}&password=${broker.password}")
private ProducerTemplate in;
@Test
public void testCamelRoute() throws Exception {
// Stop order generator route so it does not interfere with the test
context().stopRoute("generate-order");
// intercept
context.getRouteDefinition("jms-cbr-route").adviceWith(context, new RouteBuilder() {
@Override
public void configure() throws Exception {
// intercept sending and do something else
interceptSendToEndpoint("file:work/out/uk").skipSendToOriginalEndpoint().to("mock:out-uk");
// intercept sending and do something else
interceptSendToEndpoint("file:work/out/us").skipSendToOriginalEndpoint().to("mock:out-us");
// intercept sending and do something else
interceptSendToEndpoint("file:work/out/others").skipSendToOriginalEndpoint().to("mock:out-others");
}
});
MockEndpoint uk = getMockEndpoint("mock:out-uk");
uk.expectedHeaderReceived("CamelFileName", "order-uk.xml");
uk.expectedMinimumMessageCount(1);
MockEndpoint us = getMockEndpoint("mock:out-us");
us.expectedHeaderReceived("CamelFileName", "order-us.xml");
us.expectedMinimumMessageCount(1);
MockEndpoint others = getMockEndpoint("mock:out-others");
others.expectedHeaderReceived("CamelFileName", "order-other.xml");
others.expectedMinimumMessageCount(1);
OrderGenerator generator = new OrderGenerator();
in.sendBodyAndHeader(generator.generateOrderWithFileName(context(), "data/order2.xml"), "CamelFileName", "order-uk.xml");
in.sendBodyAndHeader(generator.generateOrderWithFileName(context(), "data/order3.xml"), "CamelFileName", "order-us.xml");
in.sendBodyAndHeader(generator.generateOrderWithFileName(context(), "data/order1.xml"), "CamelFileName", "order-other.xml");
assertMockEndpointsSatisfied();
}
@Override
protected String getBlueprintDescriptor() {
return "OSGI-INF/blueprint/camel-blueprint.xml";
}
}
To build this project use:
mvn install
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.the.basic.tech.info.camel.activemq.ActiveMQBlueprintTest
[ main] CamelBlueprintHelper INFO Using Blueprint XML file: /C:/Users/localworkspace/fuse-apache-camel-integration/target/classes/OSGI-INF/blueprint/camel-blueprint.xml
[ Thread-0] RawBuilder INFO Copy thread finished.
[ main] Activator INFO Camel activator starting
[ main] Activator INFO Camel activator started
[ Blueprint Extender: 1] BlueprintContainerImpl INFO Bundle ActiveMQBlueprintTest/1.0.0 is waiting for namespace handlers [http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0, http://camel.apache.org/schema/blueprint]
[ Blueprint Extender: 3] BlueprintContainerImpl INFO Bundle ActiveMQBlueprintTest/1.0.0 is waiting for namespace handlers [http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0]
[ main] ActiveMQBlueprintTest INFO ********************************************************************************
[ main] ActiveMQBlueprintTest INFO Testing: testCamelRoute(com.the.basic.tech.info.camel.activemq.ActiveMQBlueprintTest)
[ main] ActiveMQBlueprintTest INFO ********************************************************************************
[ main] ActiveMQBlueprintTest INFO Skipping starting CamelContext as system property skipStartingCamelContext is set to be true.
[ main] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: amq-example-context) is starting
[ main] ManagedManagementStrategy INFO JMX is enabled
[ main] DefaultRuntimeEndpointRegistry INFO Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000)
[ main] BlueprintCamelContext INFO AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
[ main] DefaultStreamCachingStrategy INFO StreamCaching in use with spool directory: C:\Users\AppData\Local\Temp\camel\camel-tmp-60684bac-a1d6-49e4-9ac3-22745e4bd654 and rules: [Spool > 128K body size]
[ main] XPathBuilder INFO Created default XPathFactory com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl@17497425
[ main] BlueprintCamelContext INFO Route: generate-order started and consuming from: Endpoint[timer://order?delay=2000&fixedRate=true&period=5000]
[ main] BlueprintCamelContext INFO Route: file-to-jms-route started and consuming from: Endpoint[file://work/in]
[ main] BrokerService INFO Using Persistence Adapter: MemoryPersistenceAdapter
[ JMX connector] ManagementContext INFO JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
[ main] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:1) is starting
[ main] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:1) started
[ main] BrokerService INFO For help or more information please see: http://activemq.apache.org
[ main] BrokerService WARN Temporary Store limit is 51200 mb, whilst the temporary data directory: C:\Users\Desktop\localworkspace\fuse-apache-camel-integration\activemq-data\amq\tmp_storage only has 2084 mb of usable space., resetting to maximum available 2084 mb.
[ main] TransportConnector INFO Connector vm://amq started
[ main] BlueprintCamelContext INFO Route: jms-cbr-route started and consuming from: Endpoint[activemq://incomingOrders]
[ main] BlueprintCamelContext INFO Total 3 routes, of which 3 are started.
[ main] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: amq-example-context) started in 2.458 seconds
[ main] DefaultShutdownStrategy INFO Starting to graceful shutdown 1 routes (timeout 10 seconds)
[text) thread #3 - ShutdownTask] DefaultShutdownStrategy INFO Route: generate-order shutdown complete, was consuming from: Endpoint[timer://order?delay=2000&fixedRate=true&period=5000]
[ main] DefaultShutdownStrategy INFO Graceful shutdown of 1 routes completed in 0 seconds
[ main] BlueprintCamelContext INFO Route: generate-order is stopped, was consuming from: Endpoint[timer://order?delay=2000&fixedRate=true&period=5000]
[ main] DefaultShutdownStrategy INFO Starting to graceful shutdown 1 routes (timeout 10 seconds)
[text) thread #3 - ShutdownTask] TransportConnector INFO Connector vm://amq stopped
[text) thread #3 - ShutdownTask] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:1) is shutting down
[text) thread #3 - ShutdownTask] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:1) uptime 1.530 seconds
[text) thread #3 - ShutdownTask] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:1) is shutdown
[text) thread #3 - ShutdownTask] DefaultShutdownStrategy INFO Route: jms-cbr-route shutdown complete, was consuming from: Endpoint[activemq://incomingOrders]
[ main] DefaultShutdownStrategy INFO Graceful shutdown of 1 routes completed in 1 seconds
[ main] BlueprintCamelContext INFO Route: jms-cbr-route is stopped, was consuming from: Endpoint[activemq://incomingOrders]
[ main] BlueprintCamelContext INFO Route: jms-cbr-route is shutdown and removed, was consuming from: Endpoint[activemq://incomingOrders]
[ main] RouteDefinition INFO AdviceWith route after: Route(jms-cbr-route)[[From[activemq:incomingOrders]] -> [InterceptSendToEndpoint[file:work/out/others -> [To[mock:out-others]]], InterceptSendToEndpoint[file:work/out/us -> [To[mock:out-us]]], InterceptSendToEndpoint[file:work/out/uk -> [To[mock:out-uk]]], Choice[[When[xpath{XPath: /order:order/order:customer/order:country = 'UK'} -> [Log[Sending order ${file:name} to the UK], To[file:work/out/uk]]], When[xpath{XPath: /order:order/order:customer/order:country = 'US'} -> [Log[Sending order ${file:name} to the US], To[file:work/out/us]]]] Otherwise[[Log[Sending order ${file:name} to another country], To[file:work/out/others]]]], Log[Done processing ${file:name}]]]
[ main] BrokerService INFO Using Persistence Adapter: MemoryPersistenceAdapter
[ main] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:2) is starting
[ main] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:2) started
[ main] BrokerService INFO For help or more information please see: http://activemq.apache.org
[ main] BrokerService WARN Temporary Store limit is 51200 mb, whilst the temporary data directory: C:\Users\Desktop\localworkspace\fuse-apache-camel-integration\activemq-data\amq\tmp_storage only has 2084 mb of usable space., resetting to maximum available 2084 mb.
[ main] TransportConnector INFO Connector vm://amq started
[ JMX connector] ManagementContext INFO JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
[ JMX connector] ManagementContext INFO JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
[ main] BlueprintCamelContext INFO Route: jms-cbr-route started and consuming from: Endpoint[activemq://incomingOrders]
[ main] MockEndpoint INFO Asserting: Endpoint[mock://out-others] is satisfied
[ - JmsConsumer[incomingOrders]] jms-cbr-route INFO Sending order order-uk.xml to the UK
[ - JmsConsumer[incomingOrders]] jms-cbr-route INFO Done processing order-uk.xml
[ - JmsConsumer[incomingOrders]] jms-cbr-route INFO Sending order order-us.xml to the US
[ - JmsConsumer[incomingOrders]] jms-cbr-route INFO Done processing order-us.xml
[ - JmsConsumer[incomingOrders]] jms-cbr-route INFO Sending order order-other.xml to another country
[ - JmsConsumer[incomingOrders]] jms-cbr-route INFO Done processing order-other.xml
[ main] MockEndpoint INFO Asserting: Endpoint[mock://out-uk] is satisfied
[ main] MockEndpoint INFO Asserting: Endpoint[mock://out-us] is satisfied
[ main] ActiveMQBlueprintTest INFO ********************************************************************************
[ main] ActiveMQBlueprintTest INFO Testing done: testCamelRoute(com.the.basic.tech.info.camel.activemq.ActiveMQBlueprintTest)
[ main] ActiveMQBlueprintTest INFO Took: 4.874 seconds (4874 millis)
[ main] ActiveMQBlueprintTest INFO ********************************************************************************
[ main] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: amq-example-context) is shutting down
[ main] DefaultShutdownStrategy INFO Starting to graceful shutdown 3 routes (timeout 10 seconds)
[text) thread #3 - ShutdownTask] DefaultShutdownStrategy INFO Route: generate-order shutdown complete, was consuming from: Endpoint[timer://order?delay=2000&fixedRate=true&period=5000]
[text) thread #3 - ShutdownTask] TransportConnector INFO Connector vm://amq stopped
[text) thread #3 - ShutdownTask] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:2) is shutting down
[text) thread #3 - ShutdownTask] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:2) uptime 0.529 seconds
[text) thread #3 - ShutdownTask] BrokerService INFO Apache ActiveMQ 5.11.0.redhat-630187 (amq, ID:ABC:2) is shutdown
[text) thread #3 - ShutdownTask] DefaultShutdownStrategy INFO Route: jms-cbr-route shutdown complete, was consuming from: Endpoint[activemq://incomingOrders]
[text) thread #3 - ShutdownTask] DefaultShutdownStrategy INFO Route: file-to-jms-route shutdown complete, was consuming from: Endpoint[file://work/in]
[ main] DefaultShutdownStrategy INFO Graceful shutdown of 3 routes completed in 0 seconds
[ main] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: amq-example-context) uptime 4.915 seconds
[ main] BlueprintCamelContext INFO Apache Camel 2.17.0.redhat-630187 (CamelContext: amq-example-context) is shutdown in 0.041 seconds
[ main] BlueprintExtender INFO Destroying BlueprintContainer for bundle org.apache.aries.blueprint.cm/1.0.6
[ Blueprint Extender: 1] BlueprintContainerImpl INFO Bundle ActiveMQBlueprintTest/1.0.0 is waiting for namespace handlers [http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0]
[ main] BlueprintExtender INFO Destroying BlueprintContainer for bundle ActiveMQBlueprintTest/1.0.0
[ main] BlueprintExtender INFO Destroying BlueprintContainer for bundle org.apache.aries.blueprint.core/1.4.5
[ main] BlueprintExtender INFO Destroying BlueprintContainer for bundle org.apache.camel.camel-blueprint/2.17.0.redhat-630187
[ main] Activator INFO Camel activator stopping
[ main] Activator INFO Camel activator stopped
[ main] CamelBlueprintHelper INFO Deleting work directory target/bundles/1622466865477
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.095 sec - in com.the.basic.tech.info.camel.activemq.ActiveMQBlueprintTest
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-bundle-plugin:3.2.0:bundle (default-bundle) @ camel-activemq-blueprint ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ camel-activemq-blueprint ---
[INFO] Installing C:\Users\Desktop\localworkspace\fuse-apache-camel-integration\target\camel-activemq-blueprint-1.0.0-SNAPSHOT.jar to C:\Users\.m2\repository\com\the\basic\tech\info\camel-activemq-blueprint\1.0.0-SNAPSHOT\camel-activemq-blueprint-1.0.0-SNAPSHOT.jar
[INFO] Installing C:\Users\Desktop\localworkspace\fuse-apache-camel-integration\pom.xml to C:\Users\172025\.m2\repository\com\the\basic\tech\info\camel-activemq-blueprint\1.0.0-SNAPSHOT\camel-activemq-blueprint-1.0.0-SNAPSHOT.pom
[INFO]
[INFO] --- maven-bundle-plugin:3.2.0:install (default-install) @ camel-activemq-blueprint ---
[INFO] Installing com/the/basic/tech/info/camel-activemq-blueprint/1.0.0-SNAPSHOT/camel-activemq-blueprint-1.0.0-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.062 s
[INFO] Finished at: 2021-05-31T18:44:37+05:30
[INFO] Final Memory: 33M/253M
[INFO] ------------------------------------------------------------------------
To run this project
mvn camel:run
Go to the bin folder of JBoss Fuse and execute fuse.bat
file.
C:\Users\Desktop\Software\jboss-fuse-6.3.0.redhat-187\bin>fuse
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128M; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
Please wait while JBoss Fuse is loading...
100% [========================================================================]
_ ____ ______
| | _ \ | ____|
| | |_) | ___ ___ ___ | |__ _ _ ___ ___
_ | | _ < / _ \/ __/ __| | __| | | / __|/ _ \
| |__| | |_) | (_) \__ \__ \ | | | |_| \__ \ __/
\____/|____/ \___/|___/___/ |_| \__,_|___/\___|
JBoss Fuse (6.3.0.redhat-187)
http://www.redhat.com/products/jbossenterprisemiddleware/fuse/
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Open a browser to http://localhost:8181 to access the management console
Create a new Fabric via 'fabric:create'
or join an existing Fabric via 'fabric:join [someUrls]'
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown JBoss Fuse.
JBossFuse:karaf@root> list
START LEVEL 100 , List Threshold: 50
ID State Blueprint Spring Level Name
[ 14] [Active ] [Created ] [ ] [ 50] JBoss Fuse :: ESB :: Commands (6.3.0.redhat-187)
[ 15] [Active ] [Created ] [ ] [ 80] Apache Karaf :: Admin :: Management (2.4.0.redhat-630187)
[ 142] [Active ] [ ] [ ] [ 80] Scala Standard Library (2.10.4.v20140209-180020-VFINAL-b66a39653b)
[ 143] [Active ] [ ] [ ] [ 80] Scala Reflect (2.10.4.v20140209-180020-VFINAL-b66a39653b)
[ 144] [Active ] [ ] [ ] [ 80] Guava: Google Core Libraries for Java (15.0.0)
[ 145] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: javax.inject (1.0.0.2)
[ 146] [Active ] [ ] [ ] [ 80] Jackson-module-JAXB-annotations (2.6.3)
[ 147] [Active ] [ ] [ ] [ 80] Jackson-module-paranamer (2.6.3)
[ 148] [Active ] [ ] [ ] [ 80] com.fasterxml.jackson.module.jackson.module.scala (2.6.3)
[ 149] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: swagger-annotations (1.3.12.1)
[ 150] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: swagger-core_2.10 (1.3.12.1)
[ 151] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: swagger-jaxrs_2.10 (1.3.12.1)
[ 152] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: paranamer (2.8.0.1)
[ 153] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: json4s (3.2.8.1)
[ 155] [Active ] [ ] [ ] [ 80] Fabric8 :: Maven Bundle (1.2.0.redhat-630187)
[ 156] [Active ] [Created ] [ ] [ 50] Apache Karaf :: Shell :: SSH (2.4.0.redhat-630187)
[ 158] [Active ] [ ] [ ] [ 50] Apache Mina SSHD :: Core (0.14.0)
[ 159] [Active ] [ ] [ ] [ 50] Apache MINA Core (2.0.13)
[ 162] [Active ] [Created ] [ ] [ 80] Apache Karaf :: Deployer :: Spring (2.4.0.redhat-630187)
[ 163] [Active ] [Created ] [ ] [ 80] Apache Karaf :: Deployer :: Wrap Non OSGi Jar (2.4.0.redhat-630187)
[ 164] [Active ] [ ] [ ] [ 80] mvel2 (2.2.7.Final-redhat-1)
[ 165] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: jsch (0.1.53.1)
[ 166] [Active ] [ ] [ ] [ 80] Apache Commons Collections (3.2.2.redhat-2)
[ 167] [Active ] [ ] [ ] [ 80] Apache Commons BeanUtils (1.9.2.redhat-1)
[ 168] [Active ] [ ] [ ] [ 80] bndlib (2.4.1.201501161923)
[ 169] [Active ] [ ] [ ] [ 80] Fabric8 :: Common :: Util (1.2.0.redhat-630187)
[ 170] [Active ] [ ] [ ] [ 80] Fabric8 :: API (1.2.0.redhat-630187)
[ 171] [Active ] [ ] [ ] [ 80] Fabric8 :: Core (1.2.0.redhat-630187)
[ 172] [Active ] [ ] [ ] [ 80] Fabric8 :: Groups (1.2.0.redhat-630187)
[ 173] [Active ] [ ] [ ] [ 80] Fabric8 :: Git (1.2.0.redhat-630187)
[ 174] [Active ] [ ] [ ] [ 80] Fabric8 :: ConfigAdmin Bridge (1.2.0.redhat-630187)
[ 175] [Active ] [ ] [ ] [ 80] Fabric8 :: Provisioning Agent (1.2.0.redhat-630187)
[ 176] [Active ] [ ] [ ] [ 80] Fabric8 :: Extender Listener (1.2.0.redhat-630187)
[ 177] [Active ] [ ] [ ] [ 80] Fabric8 :: JAAS (1.2.0.redhat-630187)
[ 178] [Active ] [ ] [ ] [ 80] Fabric8 :: ZooKeeper Service (1.2.0.redhat-630187)
[ 179] [Active ] [ ] [ ] [ 80] Fabric8 :: Karaf Features Service (1.2.0.redhat-630187)
[ 180] [Active ] [ ] [ ] [ 80] Fabric8 :: Insight :: Logging (1.2.0.redhat-630187)
[ 181] [Active ] [ ] [ ] [ 80] Fabric8 :: Runtime :: Container :: Karaf :: Registration (1.2.0.redhat-630187)
[ 182] [Active ] [Created ] [ ] [ 80] Fabric8 :: CXF Component (1.2.0.redhat-630187)
[ 183] [Active ] [ ] [ ] [ 80] Apache Karaf :: Shell :: SCR Commands (2.4.0.redhat-630187)
[ 185] [Active ] [ ] [ ] [ 80] Fabric8 :: Git :: Server (1.2.0.redhat-630187)
[ 186] [Active ] [ ] [ ] [ 80] Fabric8 :: Boot Commands (1.2.0.redhat-630187)
[ 187] [Active ] [ ] [ ] [ 80] Fabric8 :: Redirect (1.2.0.redhat-630187)
[ 188] [Active ] [Created ] [ ] [ 80] Apache Karaf :: Features :: Command (2.4.0.redhat-630187)
[ 189] [Active ] [ ] [ ] [ 80] Fabric8 :: Karaf Commands (1.2.0.redhat-630187)
[ 190] [Active ] [ ] [ ] [ 80] Fabric8 :: Project Deployer (1.2.0.redhat-630187)
[ 191] [Active ] [ ] [ ] [ 80] Commons IO (2.4.0.redhat-1)
[ 192] [Active ] [ ] [ ] [ 80] Fabric8 :: Maven Proxy (1.2.0.redhat-630187)
[ 193] [Active ] [Created ] [ ] [ 80] Apache Karaf :: Features :: Management (2.4.0.redhat-630187)
[ 194] [Active ] [ ] [ ] [ 80] Fabric8 :: Patch :: Core :: API (1.2.0.redhat-630187)
[ 195] [Active ] [ ] [ ] [ 80] Fabric8 :: Patch :: Core (1.2.0.redhat-630187)
[ 196] [Active ] [ ] [ ] [ 80] Fabric8 :: Patch :: Commands (1.2.0.redhat-630187)
[ 199] [Active ] [ ] [ ] [ 80] JMS API (2.0.1)
[ 212] [Active ] [ ] [ ] [ 50] geronimo-annotation_1.0_spec (1.1.1)
[ 213] [Active ] [ ] [ ] [ 50] geronimo-j2ee-management_1.1_spec (1.0.1)
[ 214] [Active ] [ ] [ ] [ 50] JAXB2 Basics - Runtime (0.6.4)
[ 215] [Active ] [ ] [ ] [ 50] Commons Pool (1.6.0.redhat-9)
[ 216] [Active ] [ ] [ ] [ 50] Commons Net (3.3.0.redhat-3)
[ 217] [Active ] [ ] [ ] [ 50] ZooKeeper Bundle (3.4.7)
[ 218] [Active ] [ ] [ ] [ 50] Apache XBean :: Spring (3.18.0)
[ 219] [Active ] [Created ] [ ] [ 50] activemq-osgi (5.11.0.redhat-630187), Fragments: 230
[ 220] [Active ] [Created ] [ ] [ 50] activemq-karaf (5.11.0.redhat-630187)
[ 221] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: velocity (1.7.0.6)
[ 222] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: jasypt-spring31 (1.9.3.redhat_3)
[ 223] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: xpp3 (1.1.4.c)
[ 224] [Active ] [ ] [ ] [ 50] Joda-Time (2.9.2)
[ 225] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: xstream (1.4.8.1)
[ 226] [Active ] [ ] [ ] [ 50] geronimo-j2ee-connector_1.5_spec (2.0.0)
[ 227] [Active ] [ ] [ ] [ 50] activeio-core (3.1.4)
[ 228] [Active ] [ ] [ ] [ 50] Scala Standard Library (2.11.7.v20150622-112736-1fbce4612c)
[ 229] [Active ] [ ] [ ] [ 80] Apache XBean :: Classloader (3.18.0)
[ 230] [Resolved ] [ ] [ ] [ 80] Fabric8 :: MQ :: Discovery (1.2.0.redhat-630187), Hosts: 219
[ 231] [Active ] [ ] [ ] [ 80] Fabric8 :: MQ :: Fabric (1.2.0.redhat-630187)
[ 232] [Active ] [ ] [ ] [ 50] camel-core (2.17.0.redhat-630187)
[ 233] [Active ] [ ] [ ] [ 50] camel-catalog (2.17.0.redhat-630187)
[ 234] [Active ] [Created ] [ ] [ 50] camel-blueprint (2.17.0.redhat-630187)
[ 235] [Active ] [ ] [ ] [ 50] camel-commands-core (2.17.0.redhat-630187)
[ 236] [Active ] [Created ] [ ] [ 50] camel-karaf-commands (2.17.0.redhat-630187)
[ 238] [Active ] [ ] [ ] [ 50] camel-spring (2.17.0.redhat-630187)
[ 240] [Active ] [Created ] [ ] [ 50] camel-cxf-transport (2.17.0.redhat-630187)
[ 241] [Active ] [Created ] [ ] [ 50] camel-cxf (2.17.0.redhat-630187)
[ 242] [Active ] [Created ] [ ] [ 80] Apache Karaf :: JMS :: Core (2.4.0.redhat-630187)
[ 244] [Active ] [ ] [ ] [ 50] camel-jms (2.17.0.redhat-630187)
[ 245] [Active ] [Created ] [ ] [ 80] Apache Karaf :: JMS :: Command (2.4.0.redhat-630187)
[ 246] [Active ] [ ] [ ] [ 80] activemq-camel (5.11.0.redhat-630187)
[ 247] [Active ] [ ] [ ] [ 80] Fabric8 :: MQ :: Fabric Camel Component (1.2.0.redhat-630187)
[ 248] [Active ] [ ] [ ] [ 50] Apache Commons CSV (1.1.0)
[ 249] [Active ] [ ] [ ] [ 50] camel-csv (2.17.0.redhat-630187)
[ 250] [Active ] [ ] [ ] [ 50] camel-ftp (2.17.0.redhat-630187)
[ 251] [Active ] [ ] [ ] [ 50] camel-bindy (2.17.0.redhat-630187)
[ 252] [Active ] [ ] [ ] [ 50] camel-jdbc (2.17.0.redhat-630187)
[ 253] [Active ] [ ] [ ] [ 50] Apache Commons Exec (1.3.0)
[ 254] [Active ] [ ] [ ] [ 50] camel-exec (2.17.0.redhat-630187)
[ 255] [Active ] [ ] [ ] [ 50] camel-jasypt (2.17.0.redhat-630187)
[ 256] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: Saxon-HE (9.5.1.5_1)
[ 257] [Active ] [ ] [ ] [ 50] camel-saxon (2.17.0.redhat-630187)
[ 258] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: snmp4j (2.3.4.1)
[ 259] [Active ] [ ] [ ] [ 50] camel-snmp (2.17.0.redhat-630187)
[ 260] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: ognl (3.1.2.1)
[ 261] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: javassist (3.12.1.GA_3)
[ 262] [Active ] [ ] [ ] [ 50] camel-ognl (2.17.0.redhat-630187)
[ 263] [Active ] [ ] [ ] [ 50] camel-routebox (2.17.0.redhat-630187)
[ 264] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: antlr (3.5.2.1)
[ 265] [Active ] [ ] [ ] [ 50] Apache ServiceMix :: Bundles :: js (1.0.0.7R2_3)
[ 266] [Active ] [ ] [ ] [ 50] camel-script (2.17.0.redhat-630187)
[ 267] [Active ] [ ] [ ] [ 50] camel-spring-javaconfig (2.17.0.redhat-630187)
[ 268] [Active ] [ ] [ ] [ 50] camel-jaxb (2.17.0.redhat-630187)
[ 269] [Active ] [ ] [ ] [ 50] camel-jmx (2.17.0.redhat-630187)
[ 270] [Active ] [ ] [ ] [ 50] camel-mail (2.17.0.redhat-630187)
[ 271] [Active ] [ ] [ ] [ 50] camel-paxlogging (2.17.0.redhat-630187)
[ 272] [Active ] [ ] [ ] [ 50] camel-rmi (2.17.0.redhat-630187)
[ 280] [Active ] [Created ] [ ] [ 80] hawtio :: hawtio-json-schema-mbean (1.4.0.redhat-630187)
[ 281] [Active ] [ ] [ ] [ 80] hawtio :: hawtio-osgi-jmx (1.4.0.redhat-630187)
[ 282] [Active ] [ ] [ ] [ 80] hawtio :: hawtio-web (1.4.0.redhat-630187)
[ 283] [Active ] [ ] [ ] [ 80] JLine (2.12.1.redhat-002)
[ 284] [Active ] [Created ] [ ] [ 80] hawtio :: Karaf terminal plugin (1.4.0.redhat-630187)
[ 285] [Active ] [ ] [ ] [ 80] JBoss Fuse :: Support :: Core (1.2.0.redhat-630187)
[ 286] [Active ] [ ] [ ] [ 80] JBoss Fuse :: Support :: Commands (1.2.0.redhat-630187)
[ 287] [Active ] [ ] [ ] [ 80] JBoss Fuse :: Support :: Karaf (1.2.0.redhat-630187)
[ 288] [Active ] [ ] [ ] [ 80] Tooling for support (1.2.0.redhat-630187)
[ 289] [Active ] [ ] [ ] [ 80] JBoss Fuse :: Support :: Fabric8 (1.2.0.redhat-630187)
[ 290] [Active ] [ ] [ ] [ 80] hawtio :: Red Hat Fuse Branding (1.4.0.redhat-630187)
[ 291] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Specs :: JSR-311 API 1.1.1 (2.7.0)
[ 292] [Active ] [ ] [ ] [ 80] C__Users_Desktop_Software_jboss-fuse (6.3.0)
[ 302] [Active ] [ ] [ ] [ 50] camel-jackson (2.17.0.redhat-630187)
[ 304] [Active ] [ ] [ ] [ 50] camel-sql (2.17.0.redhat-630187)
[ 306] [Active ] [ ] [ ] [ 50] Apache Apache HttpClient OSGi bundle (4.5.2)
[ 307] [Active ] [ ] [ ] [ 50] Apache Apache HttpCore OSGi bundle (4.4.4)
[ 308] [Active ] [ ] [ ] [ 50] camel-http4 (2.17.0.redhat-630187)
[ 309] [Active ] [ ] [ ] [ 50] camel-http-common (2.17.0.redhat-630187)
features:install activemq-camel
You can see installed dependency under list of bundles in Fuse shell. e.g.
[ 246] [Active ] [ ] [ ] [ 80] activemq-camel (5.11.0.redhat-630187)
install -s mvn:com.the.basic.tech.info/camel-activemq-blueprint/1.0.0-SNAPSHOT
List out the bundles [JBossFuse:karaf@root>list]. You can see your bundle [311].
[ 302] [Active ] [ ] [ ] [ 50] camel-jackson (2.17.0.redhat-630187)
[ 304] [Active ] [ ] [ ] [ 50] camel-sql (2.17.0.redhat-630187)
[ 305] [Installed ] [ ] [ ] [ 80] test-camel (1.0.0)
[ 306] [Active ] [ ] [ ] [ 50] Apache Apache HttpClient OSGi bundle (4.5.2)
[ 307] [Active ] [ ] [ ] [ 50] Apache Apache HttpCore OSGi bundle (4.4.4)
[ 308] [Active ] [ ] [ ] [ 50] camel-http4 (2.17.0.redhat-630187)
[ 309] [Active ] [ ] [ ] [ 50] camel-http-common (2.17.0.redhat-630187)
[ 311] [Active ] [Created ] [ ] [ 80] Camel AMQ Example using Blueprint [fuse-apache-camel-integration] (1.0.0.SNAPSHOT)
JBossFuse:karaf@root>
2021-05-31 18:44:46,664 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Apache Camel 2.17.0.redhat-630187 (CamelContext: amq-example-context) is starting
2021-05-31 18:44:46,664 | INFO | l Console Thread | ManagedManagementStrategy | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | JMX is enabled
2021-05-31 18:44:46,692 | INFO | l Console Thread | DefaultRuntimeEndpointRegistry | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000)
2021-05-31 18:44:46,826 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
2021-05-31 18:44:46,836 | INFO | l Console Thread | DefaultStreamCachingStrategy | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | StreamCaching in use with spool directory: C:\Users\172025\Desktop\Pankaj_Sharma\Software\jboss-fuse-6.3.0.redhat-187\bin\..\data\tmp\camel\camel-tmp-8f1327eb-1639-427e-9b03-3f6a85c283e9 and rules: [Spool > 128K body size]
2021-05-31 18:44:46,905 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Route: generate-order started and consuming from: Endpoint[timer://order?delay=2000&fixedRate=true&period=5000]
2021-05-31 18:44:46,907 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Route: file-to-jms-route started and consuming from: Endpoint[file://work/in]
2021-05-31 18:44:47,353 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Route: jms-cbr-route started and consuming from: Endpoint[activemq://incomingOrders]
2021-05-31 18:44:47,485 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Total 3 routes, of which 3 are started.
2021-05-31 18:44:47,485 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Apache Camel 2.17.0.redhat-630187 (CamelContext: amq-example-context) started in 0.821 seconds
2021-05-31 18:44:49,465 | INFO | - file://work/in | file-to-jms-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Receiving order order1.xml
2021-05-31 18:44:49,860 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Sending order order1.xml to the US
2021-05-31 18:44:49,860 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Done processing order1.xml
2021-05-31 18:44:54,714 | INFO | - file://work/in | file-to-jms-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Receiving order order2.xml
2021-05-31 18:44:54,730 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Sending order order2.xml to another country
2021-05-31 18:44:54,746 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Done processing order2.xml
2021-05-31 18:44:59,871 | INFO | - file://work/in | file-to-jms-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Receiving order order3.xml
2021-05-31 18:44:59,918 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Sending order order3.xml to the UK
2021-05-31 18:44:59,940 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Done processing order3.xml
2021-05-31 18:45:04,622 | INFO | - file://work/in | file-to-jms-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Receiving order order4.xml
2021-05-31 18:45:04,675 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Sending order order4.xml to another country
2021-05-31 18:45:04,690 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Done processing order4.xml
2021-05-31 18:45:09,807 | INFO | - file://work/in | file-to-jms-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Receiving order order5.xml
2021-05-31 18:45:09,839 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Sending order order5.xml to the US
2021-05-31 18:45:09,854 | INFO | [incomingOrders] | jms-cbr-route | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630187 | Done processing order5.xml
Fuse is up and running, now we can login to Hawtio Console [http://localhost:8181/hawtio].
Keep visiting the page. Will add more important examples soon. Have a nice day 🙂