Once we have an active route between two TIBCO EMS server, we need a durable or routed queue to send data between the EMS servers. Read how to create a route between Tibco ems servers. As you know queue is used for point to point and topic is for publish-subscribe. The main difference between the durable and the routed queue is also the same.

Let’s start with durable.

The durables are used to send data between EMS server using topic. Dynamic and Static are the two types of durables.

What is Dynamic & static durable

A dynamic durables get created automatically if the routes are connected between the EMS server and same global topic exist in both EMS server. The main drawback of the dynamic durables is if the EMS server goes down for some reason the data will get lost which was pending in the durable. To avoid this we need to create a static durable.

How to create a Durable?

Before creating the durable, we need to confirm the same topic exist in the destination EMS with the global property and there should be an active route connection.

Syntax : create durable <topic> <name> [<properties>]

create durable TEST.COMMON.TOPIC EMS01 route   //EMSA is the route name. i.e the destination EMS name
tcp://EMS02:7020> show routes
Route       T    ConnID  URL              ZoneName    ZoneType
EMSA        A       166  tcp://EMS01:7020     Z1          1

tcp://EMS02:7020> show durables TEST.COMMON.TOPIC
  Topic Name                  Durable                     Shared  User      Msgs    Size
TEST.COMMON.TOPIC      $sys.route.EMS01:TEST.COMMON.TOPIC   N     EMS02       0     0.0 Kb


//For dynamic durable you will be seing a '*' before the topic name in the above output.

tcp://EMS02:7020> show durable $sys.route.EMSA:TEST.COMMON.TOPIC
 Durable Subscriber:  $sys.route.EMS01:TEST.COMMON.TOPIC
 Subscription name:   $sys.route.EMS01:TEST.COMMON.TOPIC
 Shared:              no
 Client ID:
 Topic:               TEST.COMMON.TOPIC
 Type:                Static
 Status:              online
 Username:            EMS02
 Consumer ID:         5930303
 No Local:            enabled
 Selector:            <none>
 Pending Msgs:        0
 Delivered Msgs:      0
 Pending Msgs Size:   0.0 Kb

We can create multiple durables following these methods for the same topic to different EMS servers. Also as we are sending data to a TOPIC in the destination EMS, we can have bridges from the topic to multiple destinations.

What is Routed Queue?

The routed queue is another way to send data between EMS servers. We cant create the routed queue to multiple EMS server from same EMS. But we can have multiple routed queues from different EMS server to a single destination. i.e if we have a TEST.COMMON.QUEUE in EMS01 server, it’s possible to create a routed queue from EMS02, EMS03,…EMSN to EMS01. But we can’t create a routed queue between EMS02 and EMS03 if a routed queue already exists from EMS02 to EMS01.

How to create a routed queue?

First, we need to create a global queue in the destination EMS server. In my example create a TEST.COMMON.QUEUE in EMS01 server using the below command.

Syntax : create queue [queue-name] [properties]

create queue TEST.COMMON.QUEUE global

Once the queue is created, run the below command in source EMS server. For e.g EMS02.

Syntax : create queue [queue-name]@[route-name] [properties]

create queue TEST.COMMON.QUEUE@EMS01 global

If the routed queue is created successfully, you will be able to see the below output for show queue TEST.COMMON.QUEUE in EMS02 server.

tcp://EMS02:7020> show queue TEST.COMMON.QUEUE
 Queue:                 TEST.COMMON.QUEUE
 Type:                  routed from server 'EMS01'
 Properties:            global,routed
 JNDI Names:            <none>
 Bridges:               <none>
 Receivers:             0
 Pending Msgs:          0, (0 persistent)
 Delivered Msgs:        0
 In Transit Msgs:       0 to 'EMS01'
 Pending Msgs Size:     0.0 Kb, (0.0 Kb persistent)

As you can see in the above output and additional ‘routed’ property added to the queue and type as routed from server ‘EMS01’. so whatever message you send to TEST.COMMON.QUEUE in EMS02 server will go to TEST.COMMON.QUEUE in EMS01.

Hope this post will be useful for you. let me know your feedback in comments.

Leave a Reply

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