Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reliable Message Delivery for Multiple Systems in Mulesoft Anypoint
<jms:config name="JMS_Config" doc:name="JMS Config" doc:id="07bb9d7a-eec8-42d4-b64b-616b27c9b582" >
<jms:active-mq-connection />
</jms:config>
<flow name="reliableDeliveryWithJMSFlowWithoutScatterGather" doc:id="c768d1f5-91d1-4548-bca2-02601b71f6c4" >
<http:listener doc:name="Listener" doc:id="8a1d7b2c-0d70-4e20-9c37-8f083c4001ed" config-ref="HTTP_Listener_config" path="/update"/>
<scatter-gather doc:name="Scatter-Gather" doc:id="433ff431-08dc-4968-a8ac-d169e218afd6" >
<route >
<choice doc:name="Choice" doc:id="e956868b-c802-4c4f-8c93-ee59a136c1bc">
<when expression="#[payload.status == 1]">
<jms:publish doc:name="System A" doc:id="6b419a15-932d-4e0a-b38b-8a9448884e28" config-ref="JMS_Config" destination="system_a" />
</when>
</choice>
</route>
<route >
<choice doc:name="Choice" doc:id="170f7595-8dc4-4acb-a96a-d870717dd959">
<when expression="#[payload.status == 2]">
<jms:publish doc:name="System B" doc:id="c1c44a2f-843c-4985-bbbd-94b142eada3b" config-ref="JMS_Config" destination="system_b" />
</when>
</choice>
</route>
<route >
<choice doc:name="Choice" doc:id="473b2f60-f0a0-4ccd-a483-677e43033d4b">
<when expression="#[payload.status == 1 or payload.status == 3]">
<jms:publish doc:name="System C" doc:id="9158197d-8542-4398-82a8-ea9af87b26d4" config-ref="JMS_Config" destination="system_c" />
</when>
</choice>
</route>
</scatter-gather>
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment