Working with Topics and Events
Events are notification messages published to a specific topic. Web services can subscribe to a topic in order to receive events that are published to it, allowing web services to publish and subscribe to each others' notifications.
The Topic Browser in the Management Console allows you to create, manage, and subscribe to topics, and the Event Mediator makes it easy for your proxy service or sequence to publish a received request or response to a topic as an event. Eventing in the ESB of WSO2 Enterprise Integrator (WSO2 EI) is based on the WS-Eventing Specification. The following pages describe how to work with topics in detail:
Adding a new topic
Follow the instructions below to add a new topic directly to the root.
Sign In. Enter your user name and password to log on to the ESB profile's management console.
Click the "Main" button to access the "Manage" menu.
Click on "Add," under "Topics", to access the "Add Topic" page.
On the "Add Sub Topic" page, enter a name of the new topic in the "Topic" field.
You can also choose whether to subscribe and publish the topic or not in the corresponding check boxes.
Click the "Add Topic" button.
The "WSO2 Carbon" window appears. Click "OK."
The new topic is shown in the topics tree.
Adding a new sub topic
The "Add Subtopic" feature provides user the ability to add a topic under the existing topic. When adding a new topic under an existing topic, user can provide the name of the new topic and set the permissions for publishing and subscribing for that topic.
Follow the instructions below to add a subtopic.
Sign In. Enter your username and password to log on to the ESB profile's management console.
Click the "Main" button to access the "Manage" menu.
Click on "Browse," under "Topics", to access the "Topic Browser" page.
The "Topic Browser" page appears. Click on the topic you want to add a subtopic to.
Click on the "Add Subtopic" link.
On the "Add Sub Topic" page, enter a name of the new subtopic into the "Topic Name" field.
You can also chose whether to subscribe and publish the subtopic or not in the corresponding check-boxes.
Click the "Add Topic" button.
The "WSO2 Carbon" window appears. Click "OK."
The new subtopic is shown in the topics tree of the Topic Browser screen.
Viewing details of a topic/subtopic
Each topic has specific details such as permissions, WS subscription details, and JMS subscription details. In the Topic Browser screen appears. Click the Details link of the topic you want to see the details of.
If you want to delete a topic from the server, click the Delete link of that topic in the Topic Browser screen. However, to delete a topic, the subscription count for that topic and its children should be zero. Otherwise, it will prompt an error message specifying that there are subscriptions for the topic or its children.
The "Topic Details" page appears.
All the details related with a topic can be viewed on this page. The following details are available:
If you want to change the permission details, proceed to the following steps:
Using "Ws Subscription Details" the user can unsubscribe or renew the subscription.
Unsubscribing
Use the following instructions to unsubscribe.
Choose the necessary subscription and click on the "Unsubscribe" link.
In the "WSO2 Carbon" window, click "OK" to confirm your request.
Renewing the Subscription
Follow the instructions below to unsubscribe.
Choose the necessary subscription and click on the "Renew" link.
The "Renew Subscription page appears," fill in the required fields.
Click the "Renew" button.
In the "WSO2 Carbon" window, click "OK" to confirm your request.