...
- Download the
Publish-Subscribe_1.0.0.zip
file, which includes the ESB configuration described above. See Setting up the Environment for instructions on setting up the ESB and the back-end service.
YouNote Info When you set up the environment, note that you need to start two instances of the Axis2 server to run in ports 900 and 9001 by executing the following commands:
./axis2server.sh -http
9000
-https
9002
-name MyServer1
./axis2server.sh -http
9001
-https
9003
-name MyServer2
back-end service (Stock Quote Service) to simulate this example.
Your ESB, as well as the two back-end services, should not be started.
Now, you can log in to the ESB's management console and create an event as explained below.
Log in to the management console.
Click Topics on the Main menu, and then click Add.
Enter
PublisherSubsciber
as the topic name, and click Add Topic to create the topic. You will be directed to the Topic Browser tree view where the new topic is displayed.Click the new topic (in the Topic Browser), and click Subscribe to create a static subscription.
Enter
http://localhost:9000/services/SimpleStockQuoteService
as the Event Sink URL, and click Subscribe. The first back-end service (Stock Quote service) that was started on port 9000 of the Axis2 server is now subscribed to the ESB topic.Click the new topic (in the Topic Browser) again, and click Subscribe to create another static subscription.
- Enter http://localhost:9001/services/SimpleStockQuoteService as the Event Sink URL (note that the port is changed to 9001), and click Subscribe. The second back-end service (Stock Quote service) that was started on port 9001 of the Axis2 server is now subscribed to the ESB topic.
- If you click the topic (in the Topic Browser) again and click Details, you can see the two subscriptions listed as shown below.
...