Firstly if you need to guarantee just one tcp connection as per a
connection-oriented protocol then you'll need to follow this recipe:

http://camel.apache.org/fine-grained-control-over-a-channel.html

You can send multiple requests by reading from a queue (perhaps consider
using a 
http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html
ConcurrentLinkedQueue  i.e. poll the queue until there's nothing left on it.

Meanwhile you'll need another thread to obtain a polling consumer from the
same endpoint and poll with a timeout. Of course your protocol will have to
support some form of correlation id so that you can match your responses
back to your requests.

That should do the trick.
-- 
View this message in context: 
http://old.nabble.com/single-tcp-connection-with-async-requests-and-async-responses-tp27850137p27857286.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to