Hi, I am rebuilding an existing application and I would like to replace our current custom IO/message handling stack with mina. I really like the filtre chain design and found the ExecutorFilter interesting. However, in my model, some messages must be handled in parallel and some other sequentially per session.
It look like I would like to forward some messages to the ExecutorFilter configured with an OrderedThreadPoolExecutor and some other to an ExecutorFilter with UnorderedThreadPoolExecutor. Note that only org.apache.mina.core.session.IoEventType.MESSAGE_RECEIVED would go through one of the executor's. All other messages would be passed directly to the next filter. I see that MINA 3.0 might support this out of the box ( http://mina.apache.org/mina-30-design.html, Filter chain using non linked list). Is there a way to do that in MINA 2? I can imagine creating a filter that could route a message to one of the ExecutorFilter based on the message type. It would pass the "nextFilter" received in "messageReceived" to the specific executor filter thus creating a "split" at a specific point in the filter chain. Here goes the ascii art: ->ExecutorFilter(OrderedThreadPoolExecutor)--- / \ LoggingFilter -> ProtocolCodecFilter -> ThreadModelSelectionFilter - -> IOHandler \ / ->ExecutorFilter(UnorderedThreadPoolExecutor)- Is this a really bad idea? Do you expect any side effect? Thank you Manuel
