I'm working on a prototype that should demonstrate the viability of using Spring Integration. The scenario I'm working on foresees in a web service that should drop the payload on a channel that gets delivered to a JMS queue. Until now I have set up:
- an inbound-gateway that drops the payload on a channel
- a service activator (endpoint) that receives the payload via the channel (implements the method to which the webservice call is passed)
- the endpoint drops the payload on another channel that is passed to a jms outbound channel adapter
- the outbound channel adapter converts the payload to an appropriate format that is sent over the real JMS queue.
I can see that the message nicely is passing the JMS so all seems to work. So what is the problem? The problem is the return. I expected that dropping the message on JMS implies that from the moment it is dropped on the queue a synchronous reply is given to the caller of the web service. For some reason there is no return. My client, the one invoking the web service, is waiting for an answer.
Now I'm a bit lost, mainly due to in-experience with Spring Integration, where this answer should come from. Should the JMS outbound adapter send a reply? Should my endpoint, the one called by the webservice, not drop it its return value to the output-channel connected to the JMS adapter but instead leave the output-channel undefined (in my opinion implying that the response of the method called is return to the client) and instead inside the method drop the payload on an injected channel that goes to the JMS outbound adapter?
I appreciate some suggestion helping me to understand where my problem may be.
Just for clarification, I'm trying to drop the incoming payload on a JMS queue so that I can better manage the workload related to processing the payloads. It secondly brings that the clients, the ones sending the message, don't have to wait for the processing of it as they should receive a sync. reply at the moment that the message is given to the JMS queue.
THanks for you ideas and help.
it continues travelling to its final destination in an a-sync manner.