Am 10.12.2011 13:14, schrieb mgiammarco:
First, thanks for your detailed reply!

Christian Schneider wrote
you could use jms to achieve async behaviour and serialization.

- You can limit the number of consumer threads to 1 and also the number
of threads for the executor thread pool to 1 to make sure each source
only processes one message at a time
- after the query you send the result back to a common response queue
- the web appplication listens on the response queue and prints each
response
One problem with this aproch is that you do not know exactly when all
responses are there. As long as the number of engines is fixed you can
count the responses though.


Nice idea: separate frontend from backend and put a queue listener in front
of backend.
Some questions:
- can I use amqp and not jms?
There is an amqp ccomponent in camel but I am not sure how good it is. Most messaging systems provide a jms api though.
- most sources can (and MUST) process more than one message at a time, can I
give them more threads?
You can have different thread settings for each component. By putting a queue after the topic for each component you can
even load balance to several servers for one component.
- When I receive last reply I send a message "end of data" to web
application so it knows I have finished.
As long as you know the number of components that should work. I would consider using camel directly in the web app so you do not need an additional layer.

Christian

--

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to