TIBCO EMS Administration tool is used to perform various administrative tasks required while working with EMS based TIBCO projects. There are a large number of commands which can be used to perform different tasks for EMS administration. In this post, I am going to discuss about useful EMS commands and their usage scenarios.
EMS Commands to Create & Delete Destinations (Queues and Topics):
Queues and Topics are the main players when it comes to EMS based implementations. Queues and Topics are the storage destinations at EMS Server where all the messages are stored and forwarded to enable communication between message producers and message consumers.
To create a queue with the name ‘ajmal’, use the below command:
create queue ajmal;
Similarly to create a new topic with the name ‘ajmal’ you can use the below command:
create topic ajmal;
If you want to delete a queue, you can use delete command with below syntax:
delete queue ajmal;
As you can see below; you will be prompted to confirm that you want to delete the queue:
In same way you can delete a topic with the below command:
delete topic ajmal;
EMS Commands to List/Show all Queues or Topics on EMS Server:
If you want to see how many queues or topics are already created and available on your EMS Server, you can use show command for this purpose.
To see all the queues on EMS Server use below command:
In exactly same way, you can use below command to show all the topics on EMS Server:
You can specify any specific queue or topic name as well with the show command to see information specific to that queue or topic only.
For example; to see all the information about the topic ‘topic.ajmal’, you can use below command:
show topic topic.ajmal
EMS Commands to Add or Remove Destination Properties for Queues or Topics:
You can set different properties for EMS queues and topics. addprop command is used to add the properties for destinations.
For example; suppose that you want a queue ‘ajmal’ to be secure so that only permitted users can use this queue.
For this purpose; use below command to add secure property to this queue:
addprop queue ajmal secure
To remove any existing property from a queue or topic, use removeprop command as follows:
removeprop queue ajmal secure
EMS Commands to Purge Queues or Topics:
If you want to discard all old messages from a certain queue or topic; you can use purge command. For example; to purge all the messages from the queue ‘ajmal’; we use below purge command:
purge queue ajmal
If you want to purge all the queues; you can use the below command:
purge all queues
Same syntax is followed for topics as well. Just replace queue with topic to purge any topic.
EMS Command to Create Group and Add Group Members:
To make user groups in TIBCO EMS; create group command is used. For example; below command creates a new group with the name ‘test_group’ and description as “This is a test group”:
create group test_group “This is a test group”
In order to add members to a group, add member command is used as shown below:
add member test_group “ajmal”
The above command adds a new member “ajmal” to the group test_group.