In the application i work on, there is a continuous flow of messages coming from a TCP socket. Messages have different types. Different types of messages should be processed in parallel. But each specific type of message must be processed in the order they come in. I used ExecutorChannel from spring integration and it solves parallel processing need. I created a channel for each specific type of message. But i cannot guarantee ordered processing of messages for specific types.
Is there a way to do ordered processing with publish/subscribe channels while also using parallel processing?