-
Dec 7th, 2011, 07:47 PM
#1
Gateway not working well with with amqp- inbound, amq -outbound adapter pair
Hi I am trying to to a scatter gather pattern for making aggregated service calls over AMQP.
My clients make a coarse grained service call to an asynchrony gateway ( interface returns future object).\\
This gateway accepts a list of request objects and a list of service name to be invoked and looks some thing like this :
<code>
public interface AggregatedService {
@Gateway
Future<List<Object>> invoke(List<Object> requests,@Header(MyHeaders.SERVICE_NAMES) List<String> serviceNames);
}
</code>
The gateway is backed by a splitter which creates multiple messages and each of these message is sent to a different amp end point (exchange,routing key combination).
I am using a amp outbound adapter to send the messages.
Also i am using an amp inbound adapter to receive the reply messages (processed by amp consumer) and these messages are fed to a aggregator, which produces a coarse grained reply i.e. List<ResponseObjects>.
The aggregator places the response on the default reply channel of the gateway.
With this setting, what i noticed is that, my messages are reaching the correct endpoints and the aggregator is able to aggregate the reply messages as well (uses the default correlation starry),but when the message is release, my gateway do not get the message as it polling on its internal temporary channel.
But when i use a amp outbound gateway down stream (instead of amqp-outbound-adapter/amqp-inbound-adapter pair), it works perfectly well.
My questions :
-Should one not use a gateway with amp inbound/outbound adapters?
-Is there a way to send the replyChannelName over the ampq so that aggregator can forward the message to gateway's temporary channel?
-
Dec 7th, 2011, 10:17 PM
#2
hmm gateway is a reply producing message handler and hence copies the message header from the request message in the way back does not happen in my case, as i am using a inbound/outbound message adapter pair and they are not collaborating pair.
Last edited by kkcmadhu; Dec 7th, 2011 at 10:22 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules