Reputation: 1081
I have flow where as inbound endpoint I have VM Queue. Now I want to run process as:
How can I do this in MuleESB ?
Upvotes: 0
Views: 1171
Reputation: 705
If it is a asynchronous flow you can use a processing strategy to limit the number of threads running a specific flow.
<queued-asynchronous-processing-strategy name="allowOneThread" maxThreads="1"/>
<flow name="OnlyOneAtTheTime" processingStrategy="allowOneThread">
<vm:inbound-endpoint path="requestQueue" exchange-pattern="one-way" />
<logger level="ERROR" message="Before sleep : #[payload]"/>
<!-- Simulate long running processor -->
<component class="Sleep" />
<logger level="ERROR" message="After sleep : #[payload]"/>
<vm:outbound-endpoint path="responseQueue"/>
</flow>
See the Mule documentation on processing strategies.
Upvotes: 1