Yeah, 1.5 hasn't been released yet so its still changing quite a bit.
But this may be a bug in Camel 1.4.
By the way, in my test I used the activemq component rather that the jms
component to send to queues. So, something like this:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="false"
persistent="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:61616" />
</transportConnectors>
</broker>
<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<package>org.apache.camel.testmulticast</package>
<route>
<from uri="activemq:tempqueue"/>
<multicast>
<to uri="activemq:personnel.records1"/>
<to uri="activemq:personnel.records2"/>
</multicast>
</route>
...
selezovikj wrote:
I am running ActiveMQ 5.1.0 and Camel 1.4.
I thought that Camel 1.5 was not stable
janstey wrote:
I was just running a test with ActiveMQ 5.1.0 and Camel 1.5-SNAPSHOT and
all seems to work fine. Whats your JMS broker/version and Camel version?
selezovikj wrote:
I actually tested the Java DSL and it works without the "multicast"
keyword.
In the camel DSL, without using the multicast keyword it only send to
Queue1.
When I use the multicast keyword it does not send to any queues.
And it gives an error like:
Can't build body from bytes.
Error at
org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:97)
Do you have any idea why is this so ?
janstey wrote:
Actually, looks like the docs are a bit misleading. If you want the same
message routed to all destinations, you'll need to wrap the outputs in a
multicast element
<route>
<from uri="jms:numbers"/>
<multicast>
<to uri="jms:Queue1"/>
<to uri="jms:Queue2"/>
<to uri="jms:Queue3"/>
</multicast>
</route>
and also modify your Java DSL to
from("jms:numbers").multicast().to("jms:queue:Queue1",
"jms:queue:Queue2",
"jms:queue:Queue3");