Hi,
Camel support to pick up the Java DSL routing rule from spring
configuration.
You can include the activemq.xml in your camel spring configuration
file, then you can create an unit test with the embedded AcitveMQ broker
and you also need to put the activemq-camel jar into your ClassPath.
Here are the examples which helps you to specify the RouteBuidler in the
spring.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
">
<!-- START SNIPPET: example -->
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<routeBuilder ref="myRoutes"/>
</camelContext>
<!-- END SNIPPET: example -->
<bean id="myRoutes"
class="org.apache.camel.spring.RouteRefCamelContextFactoryBeanTest$MyRoutes"/>
</beans>
or using the packageScan to find the RouteBuilder by specify the package
name.
<camelContext xmlns="http://camel.apache.org/schema/spring">
<packageScan>
<package>org.apache.camel.spring.config.scan</package>
<excludes>**/*Excluded*</excludes>
<includes>**/*</includes>
</packageScan>
<endpoint id="start" uri="direct:start"/>
<endpoint id="result" uri="mock:end"/>
</camelContext>
Willem
Mick Knutson wrote:
I have seen a FUSE posting showing:
*
from("activemq:topic:VirtualTopic.topic").to("activemq:Consumer.example.VirtualTopic.topic");
With the following added to the activemq.xml configuration file:
<broker xmlns="http://activemq.apache.org/schema/core">
<virtualDestinationInterceptor>
<virtualDestinations>
<virtualTopic name=">" prefix="VirtualTopicConsumers.*."/>
</virtualDestinations>
</virtualDestinationInterceptor>
</destinationInterceptors>
*
I am interested to know if this can be unit tested with an embedded broker?
---
Thank You…
Mick Knutson, President
BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233
Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---