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
Over 2 million developers have joined DZone.
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

  • Stop Using Python for Your GenAI Apps, Use Go and Genkit Instead
  • AI Agents Expose a Design Gap in Microservices Resilience Architecture
  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Why SAP S/4HANA Landscape Design Impacts Cloud TCO More Than Compute Costs
  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 user avatar
Jitendra Bafna
·
Aug. 10, 20 · Tutorial
Likes (7)
Comment
Save
Tweet
Share
27.9K Views

Join the DZone community and get the full member experience.

Join For Free

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

The likes didn't load as expected. Please refresh the page and try again.

  • 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