Okay good news. I refactored the logic so Camel now aggregates the parallel tasks on-the-fly.
This makes a tremendous difference. Now I can split a file into 50.000 sub messages and process that in 7 sec, using at most 18mb.
Before I would hit an issue at about 25.000-30.000 message and hit OOME with 130mb.
Since the logic is more complex because there is a separate tasks which aggregates on the fly, while the other task submit new tasks, there is logic to signal between the two tasks. They kinda need to agree when there are no more messages to split, and when it has aggregated all of those.