camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Integration Patterns inside the ActiveMQ Message Broker
Date Fri, 05 Oct 2007 15:13:50 GMT
On 05/10/2007, jpcook <> wrote:
> Doh. ignore last post.
> URL styleSheet = getClass().getResource("/xslt/rugbyFixtures.xslt");
> from("jms:ss.service.solrenderservice").process(XsltBuilder.xslt(styleSheet)).to("file:rugbyFixtures");

Yeah - one of the downsides with the current DSL is often we use
static imports to make things extensible; so the use of xslt in that
one was probably a static import you saw. We should try and remove
those and add things like xpath, xslt and the like to the DSL so that
IDEs properly smart complete etc.

> What I would like to be able to do is. read in a message from my jms.  Then
> get one of the xml attributes from the message to lookup the location of
> where I want to send the output.
> I think it is that recipientList pattern. Would that be possible?

Yeah - you could either do a content based router using XPath
predicates, or use an XPath expression to determine the URL to send


from("activemq:myQueue").recipientList(xpath("'activemq:my.' + /foo/bar"));

i.e. using an XPath expression to determine the URI to send the message to.

> Finally I'm not quite sure what I should be doing with exceptions. Just
> logging them, and which log will they appear in?

There's an error handler plugin you can use to customize what to do
with exceptions and errors...

so for example you can use a dead letter channel to retry on
exceptions until some number of times and then log it to some queue or


Open Source SOA

View raw message