On Mon, Mar 1, 2010 at 7:38 AM, Carlo Camerino <[email protected]> wrote: > Hi, > > I would like to ask if this is possible, I am sending a message to an > external tcp/ip server via apache mina so i configure it in my camel > context. > I'm using one thread to send it and another thread is polling for the > reply messages, > > Is there a possibility for me to be able to correlate the response > based on a return message coming from the tcp/ip > > For example I send two messages > > Thread 1 Sending --> A010101TRANSACTION > Thread 2 Sending --> B020202TRANSACTION-TWO > > Receiver Thread Getting --> A010101REPLY-TRANSACTION > Receiver Thread Getting --> B020202REPLY-TRANSACTION-TWO > > How can I match this thread based on A010101 --> assuming this is the > correlation id that i want to set. How can I make sure that Thread 1 > will be the one getting it and not thread 2? >
I recon Mina 2.0 had some better/initial support for correlation. And hence we have waited for Mina 2.0 to become GA but it appears to taking a very very very long time for the Mina guys to get that done. I suggest to checkout on the Mina documentation about correlating Mina request/reply. > I've seen a new pattern called Return Address? How can I implement it > with TCP/IP. Afaik, it can easily be done via the JMS Component. > Is it possible via camel's tcp component? > No as TCP is very low level. Again check out Mina 2.0 to see what it offers in terms of correlation request/reply. > Thanks > Carlo > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
