Skip to content

Instantly share code, notes, and snippets.

@germanrsolis
germanrsolis / case6121-test-config.xml
Created October 26, 2012 13:34
How to control if the current node is the primary polling instance
<flow name="main">
<jms:inbound-endpoint queue="in" />
<!-- check if this application is running in the primary pooling instance -->
<choice>
<when evaluator="groovy" expression="muleContext.isPrimaryPollingInstance() == true">
<!-- process the message -->
<append-string-transformer message=" Received" />
<logger level="INFO" message="#### IS PRIMARY POLLING INSTANCE, PROCESSING THE MESSAGE" />
<vm:outbound-endpoint path="out"/>
<pluginRepository>
<id>mulesoft-release</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>https://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>