2. Scatter-Gather
• Scatter Gather is a mule routing strategy that
may sends the same payload and execute
different process asynchronously.
• By default, all results are gathered into a list of
objects that can be used when needed.
2
3. Aggregation
• If one did not specify a custom strategy, mule
provide a default one that populates all results
into one single collection
• But sometimes, a need for custom
aggregation is needed.
3
4. Custom Aggregator
Creating custom aggregator is pretty simple.
1. Create a class that implements the following
interface
org.mule.api.routing.AggregationContext
4
5. Custom Aggregator
2. Override and create your own
implementation of the method
MuleEvent aggregate(AggregationContext
context) throws MuleException
5
6. Custom Aggregator
One must understand the method and
parameters that got overridden in order to
create proper implementation.
aggregate(AggregationContext context)
6
7. Custom Aggregator
One must understand the method and
parameters that got overridden in order to
create proper implementation.
aggregate(AggregationContext context)
7
8. Custom Aggregator
There are 2 key factor that needs to understand
under the parameter context.
1. The first one is the ‘events’ and
2. The second one is ‘original event’.
8
9. Custom Aggregator
Context ‘events’ defines a collection of events
that gathered from one or multiple routes
through scatter gather. These events holds its
own message (MuleMessage) which may be
valuable because of the payload (result).
Iterating to the events allows the access to each
payload for each routes taken inside scatter-
gather.
9
10. Custom Aggregator
Context ‘Original event’ is a single event that
defines the actual event running
before/during/after the call for scatter-gather.
You may think of the Original Event as the
message being processed originally.
10
11. Custom Aggregator
3. Iterate over the collection of events and get
every data needed. If you are composing a new
payload, you need to set it as payload to the
OriginalEvent, and then return Original Event. If
adding message properties, this should also be
done in the message of the original event.
11
This template can be used as a starter file for presenting training materials in a group setting.
Sections
Sections can help to organize your slides or facilitate collaboration between multiple authors. On the Home tab under Slides, click Section, and then click Add Section.
Notes
Use the Notes pane for delivery notes or to provide additional details for the audience. You can see these notes in Presenter View during your presentation.
Keep in mind the font size (important for accessibility, visibility, videotaping, and online production)
Coordinated colors
Pay particular attention to the graphs, charts, and text boxes.
Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale.
Graphics, tables, and graphs
Keep it simple: If possible, use consistent, non-distracting styles and colors.
Label all graphs and tables.