Processing a single element of a collection is a very common scenario and for that, we have the For-each scope and Batch processing in MuleSoft.
In this article, we will talk about a new scope that is called the Parallel For-each scope.
Parallel For-Each Scope
Like the For-each scope, the Parallel For-each scope also splits the collection of messages into elements. But, unlike the For-each scope, it processes each element simultaneously in separate routes and the result is the collection of all messages aggregated in the same sequence they were before the split.
Looking at the above picture you might be wondering, where are the separate routes? And how are these routes created?
The number of routes is equal to the size of the collection and, unlike the scatter-gather, we cannot see these separate routes visually in the canvas.
No comments:
Post a Comment