Spring batch integration remote partitioning - running parallel jobs
Solution 1:
In such a setup, the MessageChannelPartitionHandler
should be step-scoped. There is a note about that in the Javadoc:
Note: The reply channel for this is instance based.
Sharing this component across multiple step instances may result in the
crossing of messages. It's recommended that this component be step or job scoped.
Making this bean step-scoped should fix the issue.