All docs This doc
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Objective: Demonstrate message routing to a set of dynamic endpoints


Start ESB with the following sample configuration:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="">
    <!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) -->
    <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
        <!-- the root property of the simple URL registry helps resolve a resource URL as root + key -->
        <parameter name=ESB_Home/repository/samples/resources/></parameter>
        <!-- all resources loaded from the URL registry would be cached for this number of milli seconds -->
        <parameter name="cachableDuration">15000</parameter>
    <sequence name="main" onError="errorHandler">
            <property name="OUT_ONLY" value="true" />
            <property name="FORCE_SC_ACCEPTED" scope="axis2" value="true" />
        <!--Dynamic Reclipient List-->
                        <endpoints value="{get-property('EP_LIST')}" max-cache="20" />
    <sequence name="errorHandler">
        <makefault response="true">
            <code xmlns:tns="" value="tns:Receiver"/>
            <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>

You are required to replace ESB_Home with the actual folder name of the ESB home.


Deploy the SimpleStockQuoteService and start three instances of sample Axis2 server as mentioned in sample 52 Sessionless Load Balancing Between 3 Endpoints.

To test this, run the stockquote client to send an out-only message as follows:

ant stockquote -Dmode=placeorder -Dtrpurl=http://localhost:8280/
  • No labels