Async Scope In Mule 4
What is Async Scope?
Asynchronous processing is a crucial aspect of modern application development, allowing you to improve performance and scalability by executing tasks concurrently.
Async can be useful for executing time-consuming operations
It does not send a response back to the main flow.
Limitation of Async:
Thread overhead
Resource consumption
Order of execution is not guaranteed
Complex error handling
Complexiting in Debugging
Example:
Create a new Mule project in anypoint studio and use Async scope from Mule palate
- Added Transform message in main flow and also in async flow with wait for 7000
Trigger the endpoint in postman and check the logger output in console.
Main thread is executed and another thread is executed simultaneously for async flow