Skip to content

Routing Messages to a Static List of Recipients

This example demonstrates how messages can be routed to a list of static endpoints. This configuration routes a cloned copy of a message to each recipient defined within the static recipient list. The Micro Integrator will create cloned copies of the message and route to the three endpoints mentioned in the configuration. The back-end service prints the details of the placed order.

Synapse configuration

Following is a sample proxy service configuration and mediation sequence that we can used to implement this scenario.

<proxy name="RecipientListProxy" startOnLoad="true" transports="http https" xmlns="">
            <header name="Action" value="urn:placeOrder"/>
                    <!--List of Recipients (static)-->
                            <address uri="http://localhost:9001/services/SimpleStockQuoteService"/>
                            <address uri="http://localhost:9002/services/SimpleStockQuoteService"/>
                            <address uri="http://localhost:9003/services/SimpleStockQuoteService"/>
            <sequence key="errorHandler"/>
<sequence name="errorHandler">
    <makefault response="true">
        <code xmlns:tns="" value="tns:Receiver"/>
        <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>