DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Automatic 1111: Custom Sketch-to-Image API
  • On-Demand-Schedulers With MuleSoft CloudHub APIs
  • Error Handling Inside Kumologica Subflow
  • Techniques You Should Know as a Kafka Streams Developer

Trending

  • Why Spark Executors Leave Cores Idle on YARN: A Packing Model for Executor Sizing
  • Evals in CI: How to Catch Agent Regressions Before Production Does
  • Closing the Drift Loop: An AI Agent That Drafts Terraform Fixes
  • The Window Closes: Why I Switched to Kotlin Before the Codebase Got Too Big

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. MuleSoft Parallel ForEach Processor vs. ForEach Processor

MuleSoft Parallel ForEach Processor vs. ForEach Processor

This video tutorial details the MuleSoft Parallel ForEach processor and compares it to the ForEach processor.

By 
Jitendra Bafna
·
Aug. 10, 20 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
28.4K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Introduction

Parallel ForEach allows you to process the collection of messages by splitting the collection into parts that are simultaneously processed in separate routes. Once all the messages has been processed, the results is aggregated in same order as they split before and flows continues.

Attributes

Description

Collection (collection)

Specifies the expression that defines the collection of parts to be processed in parallel. By default, it uses the incoming payload.

Collection Expression (collection)

An expression that returns a collection. By default, the payload is taken as the collection to split.

Timeout (timeout)

Specifies the timeout for each parallel route. By default, there is no timeout.

Max Concurrency (maxConcurrency)

Specifies the maximum level of parallelism for the router to use. By default, all routes run in parallel.

Target Variable (target)

Specifies a variable to use for storing the processed payload.

Target Value (targetValue)

Specifies an expression to evaluate against the operation’s output value.

Parallel ForEach vs. ForEach

ForEach

Parallel ForEach

ForEach processes message sequentially

Parallel For Each process the messages in parallel.

ForEach execution stopped, when an error is raised.

Parallel ForEach execute all routes before raising error of type MULE:COMPOSITE_ROUTING

ForEach doesn’t modify the original payload.

Parallel For Each outputs a collection of the output messages from each iteration.

ForEach [Videos]

Parallel ForEach [Videos]

Now, you know the difference between ForEach V/S Parallel ForEach.

MuleSoft Payload (computing) Timeout (computing) Execution (computing) Attribute (computing) Flow (web browser)

Opinions expressed by DZone contributors are their own.

Related

  • Automatic 1111: Custom Sketch-to-Image API
  • On-Demand-Schedulers With MuleSoft CloudHub APIs
  • Error Handling Inside Kumologica Subflow
  • Techniques You Should Know as a Kafka Streams Developer

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook