Jan 18th, 2012, 07:46 PM
Async Gateway + AMQP
I've a scenario where depending of some options, I can call a Gateway method and wait a result or not. Using Future like following sample is very interesting.
With this approach the same scenario can be called and wait, or forget. Does anybody knows the better pattern to implement Future request where AMQP are used?
My Scenario is : Gateway -> AMQP (Inbound - Has a service Activator to do process on payload) -> AMQP (Outbound) -> ?
Reading the docs I've understood that to Future work I'll need of Task Executor, so should I get the result of AMPQ Outbound and process on a Channel associated with a Executor? Should I get result for processing in two steps (start process on a gateway and get result on another).
Jan 22nd, 2012, 04:27 PM
Just to close it, to AMQP the solution with Future will not work, not because spring integration, but in this case is better get the result on second step using a identifier for original request.
So I'm calling gateway passing object to process and starting anothef call to wait result on database.