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 TIBCO 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:
show queues
In exactly same way, you can use below command to show all the topics on EMS Server:
show topics
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.
For more insight into EMS administration commands and details on more commands, watch below video on YouTube Channel of TutorialsPedia.
Hi AJMAL ,
YOUR WEBSITE IS VERY USEFULL WHO ARE LOOKING INTO TIBCO DEVELOPER AS WELL ASS TIBCO ADMIN.
I am FOLOWWING YOUR WEBSITE AND ALSO ISTARTED PRACTICE BY SEEING YOUR WEBSITE.I Have question
regarding EMS server. I have created group and iam trying to add one member to that gropu.while adding memeber to group showing some eerror like ” ERROR: One or more users not found.Could you please give me solution for this issue.
regarding EMS server. I have created group and iam trying to add one member to that gropu.while adding memeber to group showing some eerror like ” ERROR: One or more users not found.Could you please give me solution for this issue.
Dear Varaprasad and Jagan,
Please note that you need to create the user first by using below command:
create user user_name user_password
The above command creates a user with the specified user name and password.
Next you can add the user to any group. Thanks
Nice i also got the same error now it was resolved Thank you Ajmal.
Hi Ajaml,
Thanks- commands are very usefull….
Hi,
What is the use of this group command.
similar to the concept of users and groups in any OS.
They would basically be useful when you are trying to grant/restrict privileges to a set(GROUP) of users.
can u plz suggesst me d complete command for group
Hi,
Thanks for your web site. Quick question, I wrote a script on EMS Commands to Purge Queues. When I click on the script every thing works but it get stops when it comes to purge command. I have to answer yes. How do I pass that on to the script. I did try /y \y so for nothing worked.
Thanks.
What is browse permission used to set for queue in acl?
Hi Ajmal,
Can you help me with this?
In EMS, using connection id, How can we find which app/process is connected to that destination(queue/topic)?
I tried something like this, but couldn’t find the answer,
show consumers topic=topicname
show connections
by using both of these commands, i found the Hostname, but i want to know the application which is using that topic.
Dear Iavanya,
By first using the command show consumer queue=xyz you will get the connectionid and then using show ocnnections command; you will get all details about the connection including the host as well as ClientID. ClientID will tell you the PAR name (Process Archive name) that is using that connection.
How do I process multiple messages that are in a queue? Because ” get JMS queue message” only fetches one message for process execution
Hi Abbasi,
I am working on an automation which requires show queues for a particular host. This host is a remote desktop for my script. Could you please let me know the commands for connecting to EMS server and retrieving this data using cmd prompt.
Currently if I do show queues it is not accessible as I am not connected to remote server. Please guide me through
How to resolve too many open connection issues. Is it possible to kill the expired connections on the EMS so that the application will be able to connect to the EMS.
Can you give us the command to failover from Fault tolerant State to Active state on the same TIBCO host?
Hi Ajmal
i am not able to purge the queues.
I ran the below commands but the queues are having all messages.
purge all queues
could you pelase let me know how to do it forcefully
Hi Ajmal,
Rather than purging all the messages on the queue is there an option or command available to purge any specific message on the queue?
Supposedly there is a poisoned or bad message which is holding the processing of other messages. Can that be dumped from the queue and leaving other messages to remain on the queue.
How to browse Routed queue in Gems
Thanks for sharing the details on how to get consumers/subscribers.
Can you please let me know, how to get sender of queue or producers of topic??
hi sir ,
My Name is Naresh
how to create factories in ems?
Dear Naresh,
Use create factory command for creating factories.
How to delete some pattern of queues. For Example I want to delete queueprefix.a, queueprefix.b,queueprefix.c can I write a command delete queue queueprefix.*
How should a application be configured if they have pending messages but no consumers/receivers?
How do the receivers become activated?
Does any corresponding BW services configuration need to be looked at for a queue to activate receivers?
Pingback: TIBCO EMS Message Delivery Modes | TutorialsPedia
Hi Ajmal,
how we give permissions(view,modify,purge) for particular user.