A colleague of mine wishes to use Spring Integration for a particular use case, but I'm not sure if it's the *correct* usage of Spring Integration --- and would greatly appreciate any opinions / comments from the Spring community. Here's the use case in question:
A request comes into a Servlet, and the Servlet needs to perform multiple tasks in parallel, collect the "output" from each task, and then formulate a single response. To make a long story short, the intent is follow the composite message processor pattern (leveraging patterns: splitter, router and aggregator) to accomplish this. This is all happening within the context of a Servlet processing a request --- therefore the queues would all be memory based and the format of messages would not be something that required marshaling / un-marshaling; they would just be raw Java objects.
From a conceptual standpoint, the approach makes perfect sense to me (I'm very familiar with the Hohpe/Wolfe EI text). Where I'm not comfortable is whether this represents a good usage of Spring Integration. I say this because the context here is that of processing a request within a Servlet --- and this is certainly not the *traditional* usage of Spring Integration (integrating hetergenous applications; using physical queues and topics; etc).
So my question is, is this an appropriate use of Spring Integration? Should I instead be looking at more "lighter" approaches that deal at the level of thread and thread coordination and such?