The objective of this project is to help create a simple reference implementation for Karaf feature containing common configuration for a few message routes implemented using Camel, Blueprint (for wiring the configuration/bundles) and ActiveMQ Broker. The discussion here to meant for educational purposes only.
Karaf runtime enhanced with Camel/Blueprint/ActiveMQ runs the routes once the developed feature is deployed.
- Karaf version 2.3.1
- Camel version 2.10.4
- Xml <-> Java using XStream version 1.4.4
- ActiveMQ version 5.7.0
- Retrieve request for quote for certain categories of books.
- Tiered pricing based on volume purchase
- The aggregated response contains the price per category of books
<rfq version="1.0.0">
<id>123456</id>
<books>
<item type="FICTION">
<isbn>0486284727</isbn>
<quantity>10</quantity>
</item>
<item type="DRAMA">
<isbn>0486272788</isbn>
<quantity>5</quantity>
</item>
</books>
</rfq>
<rfq version="1.0.0">
<id>123456</id>
<books>
<item type="FICTION">
<isbn>0486284727</isbn>
<quantity>10</quantity>
<cost>25.54</cost>
</item>
<item type="DRAMA">
<isbn>0486272788</isbn>
<quantity>5</quantity>
<cost>5.84</cost>
</item>
</books>
</rfq>
The project uses split, content based routing, aggregation EIPs.
This is a multi-module Maven project.
* integration-root
* parent-pom # contains project specific properties
* configuration-feature # exposes settings to be imported by the routes per environment (DEV,SIT,PROD)
* routes/handle-rfq # camel routes
* feature # karaf feature that ties configuration & route bundles together to be deployed
Unit tests verify the routes and use EasyMock to simulate exception scenarios.
To Do:
Write Usage instructions and video demonstrating how to run the Camel Routes in Karaf