Hi Chrisitian, 

Yes. I am expecting multiple responses, as i have to poll several folders
for the results for a single message.
Your example provide fresh perspective that should be able to help me
resolve the issue.

I managed to break up the routes but still have to use a workaround to
temporary store the message replyDestination header (I cant use the JMS
Request/Reply due to long running process) in a util, then getting it and
sending back the response. It will be good if I could make it into continous
seperate route.

Can I clarify something:

1)
from("activemq:topic:one.request?clientId=client_1&durableSubscriptionName=subscription_1")
 
  .process(...) 
  .to("activemq:queue:one.response"); 


Process() here is a polling consumer?
How do i convert it into a Spring DSL?

2)
Given:
from("activemq:queue:one.response") 
  .aggregate(header("id"), new 
MyAggregatingStrategy()).completionTimeout(3000) 
  .to("..."); 

If the data coming in from activemq:queue:one.response are
(A, and B being the header("id") =>    A.1, B.2, B.1, A.2

The aggreagate will help me pack them nicely into two seperate message:

A=>  A.1, A.2
B=>  B.2, B.1

Thanks and Best Regards,
Zuff

On a side note:
I understand there is a Recipient List that provide a dynamic reciepient.
Was wondering whether we could do something similar with the File Components
too?

e.g. 

<from uri="file:dynamic?folders={folderManager.inFolders}"/>
which provides polling from various folders, as it might not be very fesible
to keep updating the Spring DSL after deployed on the production server.
Although I understand we could dynamically add routes from java codes,
however it does look a bit redundant to keep adding rotues that perform more
or less the same function.

e.g.

from("file:workflowOne").bean(processResult);
from("file:workflowTwo").bean(processResult);
from("file:workflowThree").bean(processResult);
from("file:workflowFour").bean(processResult);

Correct me if I'm wrong. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Polling-Consumer-and-a-Producer-tp5721274p5721480.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to