title: How does Spring integration manages Async Gateway
body: <p>I have configured below gateway. This act as an entry point to SI flow from a web application service layer deployed on tomcat. The invoke method would be called from the service layer. The SI flow has a number of components, it uses splitters, routers, and aggregators and finally response is sent to the outputChannel.</p>
  
  <p>With in SI flow, I am using number of task-executors to have certain flows to run in parallel (specially after splitter).</p>
  
  <p>How does SI ensure that it returns the correct response back to the call from service layer? Is there a possibility where response from one user request may be sent to other request? If yes, does it require any special handling? I can paste the full configuration if needed.</p>
  
  <pre><code>&lt;!-- Entry point Facade to DSL layer. To be called by Liquidity Portal web application --&gt;
  &lt;int:gateway id="dslServiceFacade" service-interface="dsl.gateway.IDSLServiceFacade"  
      default-request-channel="inputChannel" default-reply-channel="outputChannel" error-channel="errorChannel" async-executor="dslParallelExecutor"&gt;
      &lt;int:method name="invoke" request-channel="inputChannel" request-timeout="5000"/&gt;
  &lt;/int:gateway&gt;
  
  public interface IDSLServiceFacade {
  
  public Future&lt;DSLResponseVO&gt; invoke(Map&lt;String, Object&gt; requestMap) throws LSIntegrationException;
  }
  </code></pre>