Author: hiranya
Date: Thu Sep 23 05:13:07 2010
New Revision: 1000317
URL: http://svn.apache.org/viewvc?rev=1000317&view=rev
Log:
DLC documentation (SYNAPSE-618)
Modified:
synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml
Modified: synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml?rev=1000317&r1=1000316&r2=1000317&view=diff
==============================================================================
--- synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml (original)
+++ synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml Thu Sep 23 05:13:07
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>