Created
April 30, 2019 21:35
-
-
Save ryan-omni3/c973718a3e869428061a36dd5d7e8998 to your computer and use it in GitHub Desktop.
Reliable Message Delivery for Multiple Systems in Mulesoft Anypoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" | |
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd | |
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd"> | |
<http:request-config name="HTTP_Request_configuration" doc:name="HTTP Request configuration" doc:id="8cd01274-b235-4173-bb7c-6479ed111b62" /> | |
<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" doc:id="ae828bbb-d97c-4b03-9f68-61300b459655" > | |
<http:listener-connection host="0.0.0.0" port="8081" /> | |
</http:listener-config> | |
<http:request-config name="HTTPSystemA" doc:name="HTTP Request configuration" doc:id="510d50eb-bfdf-4bcd-858d-43a6cc9c8e97" > | |
<http:request-connection host="systema" port="8081" /> | |
</http:request-config> | |
<http:request-config name="HTTPSystemB" doc:name="HTTP Request configuration" doc:id="97e9e288-beb8-468d-9759-e8b82605f02d" > | |
<http:request-connection host="systemb" port="8081" /> | |
</http:request-config> | |
<http:request-config name="HTTPSystemC" doc:name="HTTP Request configuration" doc:id="d9e890a1-5c43-4ecf-861c-bfe2b7bd63be" > | |
<http:request-connection host="systemc" /> | |
</http:request-config> | |
<flow name="reliableDeliveryFlow" doc:id="5b7f69c5-3e81-4ccf-9f90-04c7840f5874" > | |
<http:listener doc:name="Listener" doc:id="ffb1a657-1015-4218-9749-188785cfa29e" config-ref="HTTP_Listener_config" path="/new_order"/> | |
<scatter-gather doc:name="Scatter-Gather" doc:id="00e1d2a7-345e-4bee-b8e3-b8bb3ce20a20" > | |
<route > | |
<choice doc:name="Choice" doc:id="ec27f7e9-0db1-40e7-89b2-2f004bf2e435" > | |
<when expression="#[payload.status == 1]"> | |
<http:request method="POST" doc:name="System A" doc:id="7859e814-1f94-46e4-b54f-e8c83f66fb83" config-ref="HTTPSystemA" path="/update"/> | |
</when> | |
</choice> | |
</route> | |
<route > | |
<choice doc:name="Choice" doc:id="f490bb89-0138-48c8-9441-6856edec093b" > | |
<when expression="#[payload.status == 2]"> | |
<http:request method="GET" doc:name="System B" doc:id="ae92133b-75ea-4664-9ced-855548639041" config-ref="HTTPSystemB"/> | |
</when> | |
</choice> | |
</route> | |
<route > | |
<choice doc:name="Choice" doc:id="b12eb7a9-dad4-48e5-946a-37c9fe4a4e41" > | |
<when expression="#[payload.status == 1 or payload.status == 3]"> | |
<http:request method="GET" doc:name="System C" doc:id="1c901243-6c09-40a0-bf97-6c429e2f7422" config-ref="HTTPSystemC"/> | |
</when> | |
</choice> | |
</route> | |
</scatter-gather> | |
</flow> | |
</mule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment