Enterprise Integration PatternsVersion 5.0 onwards of Apache ActiveMQ comes complete with full support for the Enterprise Integration Patterns You can easily add any of the supported Enterprise Integration Patterns This also means you can cleanly integrate all of the Camel Components Using EIP in the ActiveMQ BrokerThe broker's activemq.xml file comes already configured to support Camel; you just need to customize the routing rules. Writing EIP rules using Java codeTo use Java code to write EIP routing rules For example if all your routes are in the package org.acme.cheese; such as org.acme.cheese.whatnot.MyRouter then you could edit the XML to be... <camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <package>org.acme.cheese</package> </camelContext> Writing EIP rules using XMLTo use XML its even easier, as you can just embed whatever routing rules inside the <camelContext> element using Camel's Spring XML format <camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from uri="activemq:com.acme.MyQueue"/> <to uri="activemq:com.acme.SomeOtherQueue"/> </route> </camelContext> Using EIP in the JMS clientYou can use Camel You can then use this destination like any other JMS destination when sending or receiving messages! This means you can use any of the large number of Camel components See Also |