This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Using Topic-based Remote Registry as Subscription Manager
Objective: Demonstrate the usage of WSO2 registry as a topic based subscription manager.
Prerequisites:
- Deploy the
SimpleStockQuoteService
in sample Axis2 server and start it on port 9000. Run the WSO2 Registry in the local machine using the port 9446 (HTTPs). - Start Synapse with the sample configuration 503 (i.e.
wso2esb-samples -sn 503
).
<definitions xmlns="http://ws.apache.org/ns/synapse"> <eventSource name="SampleEventSource"> <subscriptionManager class="org.wso2.carbon.eventing.impl.RemoteRegistryBasedSubscriptionManager"> <property name="registryURL" value="https://localhost:9446/registry/" /> <property name="username" value="admin" /> <property name="password" value="admin" /> <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>
In this sample, subscriptions stored in the WSO2 Registry,
Invoke the client (Subscriber) as follows.
ant eventsubscriber
Invoke the client (Sender) as follows.
ant eventsender