Author: hiranya
Date: Thu Sep 23 05:12:40 2010
New Revision: 1000316
URL: http://svn.apache.org/viewvc?rev=1000316&view=rev
Log:
DLC documentation (SYNAPSE-618)
Added:
synapse/branches/2.0/repository/conf/sample/synapse_sample_700.xml
Modified:
synapse/branches/2.0/src/site/xdoc/Synapse_Samples.xml
Added: synapse/branches/2.0/repository/conf/sample/synapse_sample_700.xml
URL:
http://svn.apache.org/viewvc/synapse/branches/2.0/repository/conf/sample/synapse_sample_700.xml?rev=1000316&view=auto
==============================================================================
--- synapse/branches/2.0/repository/conf/sample/synapse_sample_700.xml (added)
+++ synapse/branches/2.0/repository/conf/sample/synapse_sample_700.xml Thu Sep
23 05:12:40 2010
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<!--Introduction to Synapse Message store -->
+<definitions xmlns="http://synapse.apache.org/ns/2010/04/configuration">
+ <!--Simple in Memory Message Store with name foo -->
+ <messageStore name="foo" sequence="bar">
+ <redelivery>
+ <!--retry interval 1 sec -->
+ <interval>1</interval>
+ <!--Message will be stored after 2 redeliveries -->
+ <maximumRedeliveries>2</maximumRedeliveries>
+ <exponentialBackoff>true</exponentialBackoff>
+ <backoffMutiplier>2</backoffMutiplier>
+ </redelivery>
+ </messageStore>
+
+ <!-- filtering of messages with XPath and regex matches -->
+ <filter source="get-property('To')" regex=".*/StockQuote.*">
+ <send>
+ <endpoint key="SampleEndpoint"/>
+ </send>
+ <drop/>
+ </filter>
+ <send/>
+ <!-- Endpoint named SampleEndpoint-->
+ <endpoint name="SampleEndpoint" onFault="foo">
+ <address uri="http://localhost:9000/services/SimpleStockQuoteService">
+ <suspendDurationOnFailure>2</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+
+ <sequence name="bar">
+ <log level="full"/>
+ </sequence>
+</definitions>
Modified: synapse/branches/2.0/src/site/xdoc/Synapse_Samples.xml
URL:
http://svn.apache.org/viewvc/synapse/branches/2.0/src/site/xdoc/Synapse_Samples.xml?rev=1000316&r1=1000315&r2=1000316&view=diff
==============================================================================
--- synapse/branches/2.0/src/site/xdoc/Synapse_Samples.xml (original)
+++ synapse/branches/2.0/src/site/xdoc/Synapse_Samples.xml Thu Sep 23 05:12:40
2010
@@ -345,6 +345,14 @@
</li>
</ul>
</li>
+ <li>
+ <a href="#MessageStore">Synapse Message Stores (Dead Letter
Channel)</a>
+ <ul>
+ <li>
+ <a href="#Sample700">Sample 700: Introduction to Synapse
Message Store </a>
+ </li>
+ </ul>
+ </li>
</ul></div>
<h1>
<a name="MediationSamples" id="MediationSamples">Message Mediation Samples</a>
</h1>
@@ -5265,5 +5273,63 @@ values by executing XPath expressions. T
<p>Invoke the client as follows.</p>
<pre xml:space="preserve">ant stockquote
-Daddurl=http://localhost:9000/services/SimpleStockQuoteService
-Dtrpurl=http://localhost:8280/ -Dsymbol=SUN/
</pre>
+ <h2>
+ <a name="Message Store" id="MessageStore">Introducing Synapse Message
store</a></h2>
+ <h2>
+ <a name="Sample700" id="Sample700">Sample 700: Introduction Message
Store</a></h2>
+ <pre xml:space="preserve"><!-- Introduction to the Synapse Message
Store -->
+ <definitions
xmlns="http://synapse.apache.org/ns/2010/04/configuration">
+ <!--Simple in Memory Message Store with name foo -->
+ <messageStore name="foo" sequence="bar">
+ <redelivery>
+ <!--retry interval 1 sec -->
+ <interval>1</interval>
+ <!--Message will be stored after 2 redeliveries
-->
+ <maximumRedeliveries>2</maximumRedeliveries>
+
<exponentialBackoff>true</exponentialBackoff>
+ <backoffMutiplier>2</backoffMutiplier>
+ </redelivery>
+ </messageStore>
+
+ <!-- filtering of messages with XPath and regex matches -->
+ <filter source="get-property('To')" regex=".*/StockQuote.*">
+ <send>
+ <endpoint key="SampleEndpoint"/>
+ </send>
+ <drop/>
+ </filter>
+ <send/>
+ <!-- Endpoint named SampleEndpoint-->
+ <endpoint name="SampleEndpoint" onFault="foo">
+ <address
uri="http://localhost:9000/services/SimpleStockQuoteService">
+
<suspendDurationOnFailure>2</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+
+ <sequence name="bar">
+ <log level="full"/>
+ </sequence>
+ </definitions>
+ </pre>
+ <p>
+ <strong>Objective: </strong>Introduction to Synapse Message Stores</p>
+ <p>
+ <strong>Prerequisites</strong>:Start the Synapse configuration numbered
700: i.e. synapse -sample 700 </p>
+ <p>Start the Axis2 server and deploy the SimpleStockQuoteService if not
already done. </p>
+ <p></p>
+ <p>To Execute the Client : </p>
+
+ <pre xml:space="preserve">ant stockquote
-Dtrpurl=http://localhost:8280/soap/StockQuote </pre>
+ <p></p>
+ <p>Since now you have the Axis2 Server Running when you run the client you
will get the Stock
+ generation output in Server console and the out put in the client
side. Then try shutting down
+ the Axis2 Server and running again. You will see synapse will try 2
times to deliver the message
+ and store in on the MessageStore.It will execute the log sequence
before storing the Message
+ in the Message store.</p>
+
+ <p>You can then use the JMX view of Synapse Message Store by using the
jconsole and view the stored
+ Message.You can even re start the Axis2Server and manually redeliver
the request using the
+ Same JMX view.
+ </p>
</div>
</body></document>