Scopes
Scopes usually represent a block of code that executes several Mule processors, as per the characteristics of the scope. We shall now learn about the various scopes which are a part of the Core components in Mule.
Async
The Async scope helps you add an asynchronous block of code into your flow.
If the processors in the main flow are taking a long time to execute and there is no dependency on the response from those processes, we can club them together in the Async scope.
You can configure the scope by simply setting the Max concurrency value as equal to the number of messages that you wish to be executed concurrently (see Figure 4.32):
Figure 4.32 – The Async scope in Anypoint Studio
Figure 4.32 shows us the configuration of the Async scope. The next scope is Cache.
Cache
The Cache scope helps you to store frequently recurring data. It helps the processing time of similar events by reusing the cached event.
You can select...