What is a route and why we need to use it?
In an Enterprise, the different applications will be using different EMS for data interchange. In some cases, some application might need to send some data to other application which using a different EMS server. To make this possible, Tibco EMS comes with a feature called ROUTE.
How to create a route between the EMS servers?
Consider we have two EMS server named EMSA and EMSB. these are the names which we gave in tibemsd.conf file for the name-server property.
To create a ROUTE between EMSA and EMSB we need to follow the below steps.
Syntax: create user <name> [<description>] [password=<password>] create user EMSB "Route to EMSA" password="p@ssw0rd" //password is the same which we used to login to EMSB serve create user EMSA "Route to EMSB" password="pa$$word" //password is the same which we used to login to EMSA server
Syntax: add member <group-name> <user-name>[,<user-name2>,...] add member $admin EMSA //Run in EMSB server add member $admin EMSB //Run in EMSA server
Syntax : create topic <name> [<properties>] create topic ROUTE.COMMON.TOPIC secure,global //Run this command in both EMSA and EMSB server
Syntax:create route <name> url=<url> [zone_name=<zone-name>] [zone_type=<zone-type>] create route EMSB url=tcp://EMSA:7000 zone_name=Z1 zone_type=1hop
This will create a route between the EMS server. if all configuration is correct you will be able to see a connection id else it will be showing a ‘-‘ symbol under ConnID column.
Note: If every configuration is correct and still it not working, then Confirm that you have the encrypted password added to the tibemsd.conf file in both EMS server. Please see below.
Route password
tcp://EMSA:7020> show routes Route T ConnID URL ZoneName ZoneType EMSB A 46 tcp://EMSB:7000 Z1 1
tcp://EMSB:7020> show routes Route T ConnID URL ZoneName ZoneType EMSA P 51 tcp://EMSA:7000 Z1 1
Now you can create routed queue or durables between these EMS servers and data will be passing through.
Read my post to know about the durable & routed queue.
Please comment if you have any queries on this.