Introduction to simple content based routing - Shows how a message could be made to pass through Synapse using the dumb client mode, where Synapse acts as a gateway to accept all messages and then perform mediation and routing based on message properties or content.
Execute the sample client in the dumb client mode using the following command.
This time you will see Synapse receiving a message for which Synapse was set as the ultimate receiver. The filter mediator in the main sequence performs a regular expression match on the 'To' header (http://localhost:8280/services/StockQuote) to check whether it matches the expression ".*/StockQuote.*". Since the 'To' header matches this expression the child mediators of the filter mediator get executed. As a result, the message is sent to the Axis2 server. The drop mediator after the send mediator terminates the flow of the sequence. Axis2 server will print the following log when it receives the stock quote request from Synapse.
During response processing, the filter condition fails, and thus the child mediators of the filter are skipped. The 'send' mediator at the end of the sequence forwards the response back to the client using the implicit 'To' address. The client will print a message similar to the following when it receives the response.