TIBCO EMS Useful Commands with Examples

By | February 1, 2015

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;

create queue ems command

Similarly to create a new topic with the name ‘ajmal’ you can use the below command:

create topic ajmal;

ems create topic example

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:

delete queue tibco ems

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

tibco ems show queues example

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

show topic example

 

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

tibco ems queue add secure property

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

tibco ems purge command example

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”

tibco ems create 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.

Ajmal Abbasi

Ajmal Hussain Abbasi is a TIBCO Consultant By Profession with more than 6 years experience in TIBCO products. He has extensive practical knowledge of TIBCO Business Works, TIBCO Spotfire, TIBCO BE, EMS and TIBCO ActiveSpaces. He has worked on a number of highly critical integration projects in Telecom sector by using his skills in Tibco Designer, Adapters, TIBCO EMS, RV, Administrator, TIBCO BE, TIBCO ActiveSpaces etc. Ajmal Abbasi is also experienced in developing solutions using Oracle PL/Sql, Linux and Java. You can contact Ajmal Abbasi for Consultancy, Technical Assistance and Technical Discussions.

More Posts - Website - Facebook - LinkedIn

13 thoughts on “TIBCO EMS Useful Commands with Examples

  1. varaprasad

    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.

    Reply
  2. jagan

    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.

    Reply
    1. Ajmal Abbasi Post author

      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

      Reply
      1. Chinnakanna

        Nice i also got the same error now it was resolved Thank you Ajmal.

        Reply
    1. surya vamsi

      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.

      Reply
  3. Swami

    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.

    Reply
  4. Chaitali

    What is browse permission used to set for queue in acl?

    Reply
  5. lavanya

    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.

    Reply
    1. Ajmal Abbasi Post author

      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.

      Reply
  6. Ricardo Morais

    How do I process multiple messages that are in a queue? Because ” get JMS queue message” only fetches one message for process execution

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *