camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dusausoy <>
Subject Correlation, CXF, JMS and timeout
Date Wed, 07 Jul 2010 14:17:54 GMT

First, thanks for your help last time and thanks to the authors of "Camel
in Action"; this is a great book.
After solving my last problem - which was entirely my fault btw - I now
try to design a bigger project.

I'm trying to rewrite a project I've made some time ago. 
It used BPEL, EJB's (both Session Beans and Entity Beans), JAX-WS
I plan on using Camel, CXF and ActiveMQ for the rewriting.

I've read most of the aforementioned book, but some topics need some
Here are the steps that I'm trying to reproduce :

1) A file is read on the filesystem.
2) It is analyzed and processed.
3) After the process, a CXF webservice client is invoked.
4) The return value of the latter step is sent to a JMS queue. This value
will be used for correlation.
5) This "process" ends up here, waiting for another file to be read
(return to step 1).

== These steps are currently implemented and are ok.
== Another process then steps in

6) The JMS message is read from the queue.
7) A Timeout is then launched.
8) If the timeout has been reached and step 9) has not been accomplished
(with the right correlation set), then another processing - typically
sending alert email and stopping the process - is done.
9) A CXF service implementation receives a message.
10) It parses the message, using a part of it for correlation with the
message fetched from the JMS queue.
11) It does its processing.

So, to summarize : if the timeout has been reached and nothing has been
received we send an email, otherwise we process what have been received and
discard the timeout.

I was thinking about using the Aggregator EIP in order to implement the
steps 6->11, using a completionTimeout but I'm confused with two things :
* can I aggregate messages coming from different endpoints (in this case,
CXF and JMS) or should I route them to a unique endpoint ?
* I don't see how to use the completionTimeout in this case.

Can someone shed some light on this ?

Thanks a lot.

Bruno Dusausoy
YP5 Software
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.

View raw message