Reputation: 5686
Say you have this route :
from("direct:processOrders")
.process(new MultipleOrdersProcessor())
.to("direct:done")
MultipleOrdersProcessor loops through the orders and does "things"
What would be the benefit of using a splitter and having a SingleOrderProcessor instead of MultipleOrdersProcessor ?
Upvotes: 2
Views: 171
Reputation: 4877
One immediate benefit is the ability to process orders in parallel, provided the use case fits parallel processing. In case of MultipleOrdersProcessor a custom implementation is required for parallel processing.
Upvotes: 2
Reputation: 56
I can think of two benefits
Upvotes: 3