-
1. Re: camel bean to activemq
igarashitm Nov 4, 2015 7:33 PM (in response to mlybarger)1 of 1 people found this helpfulI would recommend to use switchyard://ActiveMQQueue or something and bind camel-jms binding to the reference instead of routing it to camel-activemq endpoint directly, so that the boundary would have SY aware interface and thus be visualized.
-
2. Re: camel bean to activemq
mlybarger Nov 12, 2015 9:38 AM (in response to mlybarger)Thanks for the reply. I needed to learn how to specify in camel a message to a queue. I don't want to use SY because I don't think it allows for dynamic binding of the output queue.
public class CamelServiceRoute extends RouteBuilder {
{
System.setProperty("x.p", "queue/test1.out");
System.setProperty("y.p", "queue/test2.out");
}
public void configure() {
from("switchyard://CamelService").log( "Received message for 'CamelService' : ${body}")
.setHeader("propName", xpath("/path").resultType(String.class))
.recipientList(simple("jms:queue:${properties:${header.propName}} connectionFactory=#activemq/ConnectionFactory"));
}
}
switchyard/CamelServiceRoute.java at master · mlybarger/switchyard · GitHub
-
3. Re: camel bean to activemq
igarashitm Nov 30, 2015 8:41 PM (in response to mlybarger)Oops, I just realized I overlooked this...
I don't want to use SY because I don't think it allows for dynamic binding of the output queue.
I haven't tried yet, but it should be possible to override the destination with specifying "destination" header for Camel JMS via SY context property.