I am trying to create a Camel route that will process incoming IMAP messages in parallel. The mail component should distribute incoming mails to different threads (but every message should pass the two process steps in order).
Something like this:
from("imap://...")
.threads(4)
.process(new FirstProcessor())
.process(new SecondProcessor());
This seems to send new message to different threads, but not in parallel (thread n+1 starts after thread n finishes). How can I achieve parallel processing here?