In enterprise architecture; there can be two or more EMS Servers being used for different application systems which may sometimes require some data communication between each other. To enable transfer of EMS messages between two or more EMS Servers; TIBCO EMS provides routing feature so that messages may be routed from one server to one or more other servers.
In this TIBCO EMS Routing tutorial; I will be explaining step by step how to achieve routing between two TIBCO EMS Servers.
Step 1: Enable Routing
Enabling the routing feature is the first step that needs to be done. By default; if you look into the configuration file—tibemds.conf; routing is disabled. To enable routing; just change routing value to enabled in this configuration file for both EMS Servers (For ease of understanding I will name the two servers in this post as ServerA and ServerB. In actual; name of the server can be found in the tibemsd.conf file with property name server.)
Make sure that you enable routing in both ServerA and ServerB.
Also note that any changes that you make directly in the configuration files; won’t affect immediately and you will have to restart EMS Servers after making all configuration changes.
Step 2: Create Route
Route from ServerA to ServerB can be created either by defining the route in the configuration file routes.conf on ServerA or by using the below command on EMS administration tool after connecting to EMS ServerA:
create route ROUTE_NAME url=SERVERBURL zone_name=ZONE_NAME zone_type=1hop|mhop properties
in the above command; change ROUTE_NAME to the name of SERVERB, url should be full url of the EMS Server for SERVERB (including protocol, host, port), zone_name can be any name that you want to give to this zone and zone_type should be single hop or multi-hop according to your needs. If routing at only one hop level is needed; use 1hop for this. Properties are optional properties which can be added to the route.
In the same way create route on SERVERB as well where url will be pointing to EMS SERVERA.
Step 3: Create Users on Both Servers for Routing
For routing to work; on both servers we need to create users (either by updating users.conf file or through EMS administration tool).
On SERVERA, create a new EMS User with the same name as the name of SERVERB. This user should have password based on Server Password on SERVERB (set on SERVERB using SET SERVER Password command).
In the same way create a new EMS User on SERVERB with the name matching the name of SERVERA and password same as the server password of SERVERA.
Please note that these user creations are required if authorization is enabled on the server. If the required users are not created or if the users don’t have sufficient rights; you may get error like below:
Unable to initialize route XYZ: route server returned: ‘invalid name or password’
However; If authorization is disabled; this is not needed then.
Step 4: Create Proxy Receiver/Routing Queue and Home Queue
For this example; I am using queues to show how routing works instead of topics. However, routing can be achieved for any types of destinations.
Let’s suppose that we want to route all the messages that are received on a queue tutorialspedia.queue on SERVERA to a queue with the same name on SERVERB.
For this purpose; create a Global queue on SERVERB using below command:
create queue tutorialspedia.queue global
The above command will create a queue tutorialspedia.queue with global property set.
Now, create a queue with the same name on SERVERA but use the suffix @SERVERB for this queue as this will be a routing queue only to route the messages towards the home queue on the SERVERB.
The proxy queue (routing queue) on SERVERA will be created using below command:
create queue tutorialspedia.queue@SERVERB
Step 5: Test EMS routing
After completing step 1 to 4; restart ems servers for both SERVERA and SERVERB so that changes become effective.
After this; just design a simple process in TIBCO BW which will be connecting to SERVERA and send JMS message towards the routing queue.
You should notice that same message is routed to the home queue on SERVERB from where consumers may pick the message and consume it.
Thank you Amjal!
I found your tips very useful. I think, it’s only one of 100s leaves a thank-you message here, so let me express gratitude for your diligent work from the whole of Tibco users community!
:)))
MP
Thanks, Very useful.
But if Server routes are already established, we do not need to restart EMS Servers
Dear Manish,
You are right. Restart is required only if routes are created newly. In my tutorial; since routes were created and were not available readily; restart was required. Thanks for your feedback.
nice article, crisp and clear. thanks your time to post this.
Thanks Ajmal,
your updates are precious for us.
Hi Ajmal,
Masha Allah, Really your tutorials are very helpful for anybody who is new to TIBCO.
I am facing a trouble in this route.
I have two serverA with name SA and ServerB with name SB.
I am enabling route from ServerA to ServerB.
For that, i created User SB in Server A.
and User SA in ServerB.
Then in ServerA, when i create Route with RouteName as SB, URL of ServerB with Port, Zone Name & Zone Type, the route does not get connected. the Connection says false. Route stays disconnected.
Then When I deleted this and then in ServerB, when i create Route with RouteName as SA, URL of ServerA with Port, Zone Name & Zone Type, the route gets CONNECTED.
I know and understand that Route is bi-directional, and if it gets connected from anyside, it should be good. but I want it to be active on ServerA and Passive on ServerB.
It is happening the reverse way.
What is the reason? Could you please help me if i am missing anything.
Thanks in Advance.
Afroz Baig
Hi Ajmal,
Tibco EMS is dependent or independent product, I mean does we need to install TRA first and then EMS like??
if suppose it’s no need to install TRA first or no need of TRA then how we add the Tibco EMS installed server in domain, because we can add the server in domain only on which TRA installed, Kindly help me for understanding my doubt ,
many Thanks In advance
hi Kishor,
Tibco EMS is in independent you can install in first but TRA should be installed before tibco admin
HI
I want to remove @server name for backout plan if Proxy-Q didn’t work,( if we delete the proxy-Q and create the normal Q then we need to restart the server that’s long process), we can remove or revoke the prop for Q but can we able to remove @server name for the Q with out deleting proxy-Q .
is there any command to do that need help…..!
Hi Ajmal,
Route example is good.can you explain little bit depth about hop ,zone .
What is the diffference about th hops?
Ems file storage?
Thanks
Kiran
Thank You Mate…
Its Well written article…
Bonjour
I’m blocking at Step 3: Create Users on Both Servers for Routing. I created user but I still have the error Unable to initialize route XYZ: route server returned: ‘invalid name or password’
I think I did not understand the user to use.
Hi,
Execute the below sybtax in both the servers.
Show server
You will get the Server names as 1A and 1B.
While creating route in server A ensure that the route name in Server A as 1B.
create route 1B url zone..
Vive-versa in Server B.
Ensure you have created a user 1B in serverA.
If it has authorization, then in ServerA you need to create the user 1B and password of ServerB.
—
Regards, Vj
Hi,
can you help us with steps how to setup SSL routing between ems servers?
Thanks. Very nice link.
I have done all the steps (1 to 4). For Step 3, I have set authorization is disabled.
But my queue is not getting sync. I am not able to see message of SERVERA on SERVERB queue. After some time been message has been expired.
Can you please help me on this. As I am new in tibco.
Excellent Bro….. May god bless you….
Pingback: TIBCO EMS Performance Tuning Tips and Tricks