You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Java Programmer <jp...@gmail.com> on 2008/10/29 15:18:43 UTC

[Servicemix/ActiveMQ/Camel] Merging JMS data into one document

Hello,
Here is situation:
1) I got request which is made with two separate requests eg.
<wholerequest><subrequest1 proceed="true" /><subrequest2
proceed="true" /></wholerequest>
2) I multicast() that request into two filters which sperately
forwards them further if  proceed=="true" or abandon if false
3) after leaving filter message are send to connectors via JMS,
connectors get data from remote web services, made some changes into
XML, and put such response into another JMS queue which only have
responses
4) this is part which I don't get well - I would like to get all
responses from queue and make one response for them eg.
<wholeresponse><subresponse1 /><subresponse /></wholeresponse> but
don't know how - I use ActiveMQ & Camel, and first think about Content
Message Enricher but is it good solution? or maybe I should do it with
some XSLT transformations?

What way the queue will be checked on recieved messages? Is there any
example of solving my problem - the loan broker example is fine but
it's consider same data provided which don't need transforming, but
only merging into some collection (wait for 3, merge and respond)?

Best regards,
Adr

Re: [Servicemix/ActiveMQ/Camel] Merging JMS data into one document

Posted by James Strachan <ja...@gmail.com>.
2008/10/29 Java Programmer <jp...@gmail.com>:
> Hello,
> Here is situation:
> 1) I got request which is made with two separate requests eg.
> <wholerequest><subrequest1 proceed="true" /><subrequest2
> proceed="true" /></wholerequest>
> 2) I multicast() that request into two filters which sperately
> forwards them further if  proceed=="true" or abandon if false
> 3) after leaving filter message are send to connectors via JMS,
> connectors get data from remote web services, made some changes into
> XML, and put such response into another JMS queue which only have
> responses
> 4) this is part which I don't get well - I would like to get all
> responses from queue and make one response for them eg.
> <wholeresponse><subresponse1 /><subresponse /></wholeresponse> but
> don't know how - I use ActiveMQ & Camel, and first think about Content
> Message Enricher but is it good solution? or maybe I should do it with
> some XSLT transformations?

Sounds like you need an Aggregator?
http://activemq.apache.org/camel/aggregator.html


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/