Articles

In this article, I will explain how to implement a logic in Mule ESB that will avoid parallel processing or simultaneously running of the same mule application. 

This Mule Application is triggered via HTTP GET Request. Once there’s a new request, it will create a variable #[flowVars.correlationId], which the value came from #[message.rootId]. This ID is a unique identifier of a particular Mule process and in this application, it will be stored inside the Cache Scope as a payload using the Transform Message { correlationId: flowVars.correlation } (Map Object Data Type). Then after that scope, we have a Choice Router that will determine if there’s an existing running process or not by checking if the #[payload.correlationId == flowVars.correlationId] (TRUE means there’s no cached data yet) response an HTTP status 200, if FALSE return HTTP status 409 Conflict.

Source de l’article sur DZONE