Dec 15th, 2010, 05:35 AM
How to correlate int:gateway request and replies without tempReplyChannel header?
So imagine I have an int:gateway(interface proxy), a request and reply channel, and a service activator which bounces request messages to the reply channel.
The request message has a TemporaryReplyChannel as it's replyChannel header which allows SI to correlate the reply with the original gateway request.
Now if I replace the service-activator with an external service (using a pair of outbound and inbound tcp-adapters for example), there is no temp reply channel header to use to return the original method call.
What I have done is to store a map of my correlation ids to temp reply channels so when the reply arrives, I can send it to the correct channel and my method call returns.
So my question is: is there a better way to do this?