2. • Sometimes referred to as "wrappers“.
• The message processors, appear as processing
blocks when placed on the Message Flow canvas.
• Embed message processors in them.
• Certain scopes (i.e., Poll, Message Enricher,
and Until Successful) require to embed no more
than one message processor within the
processing block.
• Typically, the other sub-group of scopes (which
includes Composite, Async, and Sub Flow)
accepts more than one message processor.
Scopes
3. • Scopes add functionality to the embedded
message processor by:
– Triggering it periodically.
– Enhancing its payload.
– Triggering it until the associated event succeeds.
Scopes
4. • Available scopes in Mule:
– Async
– Cache
– Composite Source
– Foreach
– Message Enricher
– Poll
– Sub Flow
– Transactional
– Until Successful
Scopes
5. • Async :
– Creates a block of message processors that
execute asynchronously while the rest of the flow
continues to execute in parallel.
– Example :
• populate an Async scope with a sequence of building
blocks that perform logging so that logging does not
slow down the rest of the application flow.
Scopes : Async
6. • Cache :
– Caches data produced by part of a flow.
– Wrap a cache scope around message processors in
the flow so that it caches the response events
produced within the scope.
Scopes : Cache