## Apache Synapse

## Sample 857: Introduction to Synapse Recipient List eip function template

<!-- Introduction to Synapse Recipient List eip function template --> <definitions xmlns="http://ws.apache.org/ns/synapse"> <import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /> <sequence name="main"> <property name="OUT_ONLY" value="true"/> <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/> <call-template target="synapse.lang.eip.recipient_list"> <with-param name="recipient_list" value="http://localhost:9000/services/SimpleStockQuoteService,http://localhost:9001/services/SimpleStockQuoteService"/> </call-template> <drop/> </sequence> </definitions>

### Objective

This sample is an introduction to Synapse Recipient List eip function template.

### Pre-requisites

- Start two instances of sample Axis2 server on HTTP ports 9000,9001. And deploy the SimpleStockQuoteService in all of them.
- Start Synapse using the configuration numbered 857 (repository/conf/sample/synapse_sample_857.xml)
  Unix/Linux: sh synapse.sh -sample 857
  Windows: synapse.bat -sample 857

### Executing the Client

In this sample, the messages sent to Synapse will be route to the endpoints defined under recipient_list parameter.

Invoke the client as follows.

ant stockquote -Dtrpurl=http://localhost:8280/

Back to Catalog