Author: asankaa Date: Fri Dec 19 11:19:22 2008 New Revision: 27439 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=27439
Log: update the sample # 500 and add the sample # 501 Modified: branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml Modified: branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml URL: http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml?rev=27439&r1=27438&r2=27439&view=diff ============================================================================== --- branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml (original) +++ branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml Fri Dec 19 11:19:22 2008 @@ -448,6 +448,9 @@ <li> <a href="#Sample500">Sample 500: Introduction to Eventing</a> </li> + <li> + <a href="#Sample501">Sample 501: EventSource with static subscriptions</a> + </li> </ul> </li> </ul> @@ -5395,18 +5398,23 @@ <p>   </p> -<pre xml:space="preserve"> -<!-- Simple Eventing configuration --> +<pre xml:space="preserve"><!-- Simple Eventing configuration --> <definitions xmlns="http://ws.apache.org/ns/synapse"> - <eventSource name="eventing"> - <subscriptionManager - class="org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager"> - <property name="topicHeaderName" value="Topic" /> - <property name="topicHeaderNS" - value="http://apache.org/aip" /> - </subscriptionManager> - </eventSource> - <log level="full" /> + <eventSource name="SampleEventSource"> + <subscriptionManager class="org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager"> + <property name="topicHeaderName" value="Topic"/> + <property name="topicHeaderNS" value="http://apache.org/aip"/> + </subscriptionManager> + </eventSource> + + <sequence name="PublicEventSource" > + <log level="full"/> + <eventPublisher eventSourceName="SampleEventSource"/> + </sequence> + + <proxy name="EventingProxy"> + <target inSequence="PublicEventSource" /> + </proxy> </definitions></pre> <div> <p> @@ -5445,5 +5453,62 @@ </p> <pre xml:space="preserve">ant eventsubscriber -Dmode=getstatus -Didentifier=urn:uuid:6DFDF649A67416BFCC1228112473802909001-111373032</pre> </div> + <h2> + <a name="Sample501" id="Sample501">Sample 501: EventSource with static subscriptions</a> + </h2> + <p> +   + </p> +<pre xml:space="preserve"><!-- Eventing configuration with static subscriptions--> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + <eventSource name="SampleEventSource"> + <subscriptionManager class="org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager"> + <property name="topicHeaderName" value="Topic"/> + <property name="topicHeaderNS" value="http://apache.org/aip"/> + </subscriptionManager> + <subscription id="mysub1"> + <filter source ="synapse/event/test" dialect="http://synapse.apache.org/eventing/dialect/topicFilter"/> + <endpoint><address uri="http://localhost:9000/services/SimpleStockQuoteService"/></endpoint> + </subscription> + <subscription id="mysub2"> + <filter source ="synapse/event/test" dialect="http://synapse.apache.org/eventing/dialect/topicFilter"/> + <endpoint><address uri="http://localhost:9000/services/SimpleStockQuoteService"/></endpoint> + <expires>2020-06-27T21:07:00.000-08:00</expires> + </subscription> + </eventSource> + + <sequence name="PublicEventSource" > + <log level="full"/> + <eventPublisher eventSourceName="SampleEventSource"/> + </sequence> + + <proxy name="EventingProxy"> + <target inSequence="PublicEventSource" /> + </proxy> +</definitions></pre> + <div> + <p> + <strong>Objective:</strong> Demonstrate static subscription capability of Synapse + </p> + <p> + <strong>Prerequisites:</strong> Deploy the + SimpleStockQuoteService in sample Axis2 server and start it on port + 9000. + </p> + <p> + Start Synapse with the sample configuration 501 (i.e. synapse -sample + 501). + </p> + <p> + In this sample, two static subscriptions created by providing the SimpleStockQuoteService as the event sink. + </p> + <p> + Invoke the client (Sender) as follows. + </p> +<pre xml:space="preserve">ant eventsender</pre> + <p> + Event sender will send the events to the static subscriptions + </p> + </div> </body> </document> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
