A Topic is a subject to which publishers route messages so that the subscribers of that topic can receive the messages. Topics are commonly used in messaging systems. They enable you to publish message related to a particular sector under one category. A Topic typically has a name that is relevant to the messages being published to it. For example, to publish messages related to sports, you can create a topic by the name SportsNews
and publish all messages related to sports news under it. Users can look up different topics in the topic tree, subscribe to selected topics and receive messages that are published under that topic by publishers. This way, a user can receive all messages related to a particular area, routed by different publishers.
You can create and manage topics through the management console of the CEP as described in the following steps:
- Log in to the CEP management console and select Add menu under the Topics menu.
- Fill in the topic name and permissions and click Add Topic.
All user roles currently created in the server appears under Permissions. Each role can subscribe and/or publish to a topic.- Subscribe permission: Users who are assigned this role receive messages that are published under the topic
- Publish permission: Users who are assigned this role can publish messages to this topic so that subscribers can receive them
- After adding the topic, the Topic Browser appears. Topic browser displays all topics available in the local broker in a tree view.
- The Topic Browser does not display any operations available for the topic initially. Click on the topic to see the operations as follows:
The operations are as follows:Add Subtopic
Used to add a topic under an existing topic. Similar to adding a new topic directly to the root, you must provide a subtopic name and set permissions separately to different user roles.
Subscribe
When you click the Subscribe link, the following form opens:
The fields in the form are described below:Detail Description Topic* Topic name appears automatically. Subscription Mode* The following subscription modes are available:
Event Sink URL This is the URL which the subscriber should provide to receive events published. When events are published to the topic, they are sent to the specified URL here. Expiration Time Here user can specify the expiration time of the subscription. This is not a required parameter and if user leave it alone, subscription will never be expired. Topic details
Following table shows all the details related with a topic can be viewed in this page.
Detail Description Permission Details Permissions related with the topic can be viewed here and if the user wants to change the permissions with regarding that topic, user can change the ticks on the provided check boxes and click on update permissions button. WS Subscription Details All the ws subscriptions for the topic and its all children are listed here. If the user wants to unsubscribe from the topic, he can simply click on the unsubscribe link on the last column of each row. Publish This publish option provide the user the ability publish a sample XML message to a topic. Once there is a subscription for the topic, event sink URL will receive that published XML message once its click on the publish button after placing a xml message in the provided space. Delete
This will delete the topic from the server. To delete a topic , 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.