In messaging systems, message routing is done on the basis of a concept called Topics: First, we need to have topics created in the EI Message Broker runtime. A JMS client can then be configured to publish messages to this topic and other JMS clients can be configured as subscribers of this topic. When the publisher sends a message to the topic, it will be dispatched to all the JMS clients that are subscribed to that topic.
...
- Log in to the management console.
- In the Main tab, click Topics -> Add. The Add Topic screen will open.
Enter a name for the topic in the Topic field.
Note Note the following for the Topic name:
- Topic name can starts with any of the following: * , alphanumeric characters (a-z, A-Z or 0-9). These can be used any number of times delimited by dots.
- Topic name can end with the following: * , alphanumeric characters, hash (#).
- The “/” symbol (TENANT_SEPARATOR) can only be used to separate the tenant domain from the topic name when creating topics/subscribing to topics from external clients.
- The colon (":") can be used in Topic names if the
<
allowStrictNameValidation>
property is set tofalse
in thebroker.xml
file (stored in the<EI_HOME>/wso2/broker/conf
folder). This is only applicable for the AMQP transport.
- Now you need to grant permissions for users in your system to publish and subscribe to the topic you are creating. You will be granting these permissions to users based on the user's role. As shown below, all the user roles in your tenant domain will be listed. You can select the relevant check box against each role:
- If the Subscribe check box is selected, the users linked to the role has permission to subscribe to the topic.
- If the Publish check box is selected, the users linked to the role has permission to publish information to the topic.
Info The user that creates a topic in the system is by default granted permission to Subscribe and Publish to that particular topic. This is handled in the system by automatically creating an internal role and assigning it to the user creating the topic.
- Click Add Topic to create the topic.
- If the topic is added successfully, a message appears. Click OK to view the topic browser where the newly added topic is listed in a tree view:
Anchor Topic Browser Topic Browser - Click on the topic to view all the operations available. See the section on viewing topic details for more information.
...