Scopes in mule allow you to group message processors together. Certain scopes like Poll, Message Enricher, and Until Successful allow only one embedded message processor. Scopes can execute synchronously, halting the parent flow until the child scope completes, or asynchronously where the parent flow continues independently. The Cache Scope stores and reuses frequently called data, and the Composite Source handles messages from multiple sources. The Foreach splits messages into parts for processing while the Poll periodically retrieves messages. The Transactional scope executes a series of steps atomically, while the Until Successful retries an embedded processor until it succeeds or hits retry limits.
1 of 10
More Related Content
Scopes in mule
1. Scopes in mule
The message processors known as Scopes appear as
processing blocks when you first place them on the
Message Flow canvas. Certain scopes
(i.e., Poll, Message Enricher, and Until Successful)
require you to embed no more than one message
processor within the processing block.
2. • triggering it periodically
• enhancing its payload
• triggering it until the associated event
succeeds
3. • Synchronous means that processing on the
main flow halts, and all the message
processors in the child flow execute before the
parent flow resumes processing; in other
words, no processing takes place in the parent
flow while the synchronous child flow is
executing.
4. • Asynchronous means that as soon as the child
flow receives a message, it immediately sends
one copy of that message to the next message
processor in the parent flow so that processing in
the parent flow continues, essentially
uninterrupted. The asynchronous child flow also
starts processing another copy of the message
with its own sequence of message processors.
These two simultaneous processing branches
continue independently until each completes.
5. Cache Scope
• The Cache Scope saves on time and
processing load by storing and reusing
frequently called data. You can put any
number of message processors into a cache
scope and configure the caching strategy to
store the responses (which contain the
payload of the response message) produced
by the processing that occurs within the
scope.
6. Composite Source
• To handle incoming messages from multiple
input channels, place two or more message
sources (also known as receivers) into a
Composite Source. A message entering the
Composite Source on any supported channel
triggers the processing flow.
7. Foreach
• Splits any type of message collection aside
into individual messages for processing, and
then aggregate them again at the end of the
scope
8. Poll
• Periodically polls an embedded message
receiver for new messages. For example, set a
Poll to retrieve email at regular intervals by
placing a request-response connector such as
SMTP within the Poll processing block.
9. Transactional
• Mule applies the concept of transactions to
operations in application for which the result
cannot remain indeterminate. In other words,
where a series of steps in flow must succeed
or fail as one unit, Mule uses a transaction to
demarcate such a unit.
10. Until Successful
• Attempts, at a specified interval, to route a
message to an embedded message processor
until one of the following occurs:
* it succeeds
* the maximum number of retries is reached
* an exception is thrown