Sunteți pe pagina 1din 6

Routes Creation In TIBCO EMS

Filed under: Tibco EMS SRIK @ 3:14 pm


This example will just show how you create routes in EMS, Please follow the instructions to create
routes on two different EMS Servers.
1. Create a copy for bin in c:\tibco\ems and name it to bin2.
2. Open tibemsd.conf under c:\tibco\ems\bin change the following settings
a. Change the server name to EMS SERVER to EMS-SERVERA
b. routing property to enabled
c. save and exit
3. Open tibemsd.conf under c:\tibco\ems\bin2 change the following settings
a. Change the server name to EMS SERVER to EMS-SERVERB
b. Change the port to tcp://7224 instead of tcp://7222
c. routing property to enabled
d. save and exit
4. open factories.conf under c:\tibco\ems\bin2 change the following settings
a. Change the GeneralConnectionFactory,QueueConnectionFactory and TopicConnectionFactory URL to
tcp://7224 instead of tcp://7222 ( You can leave FT and SSL connection factories, only required when
you are using these pairs)
b. save and exit
5. Start EMS-SERVERA
a. You can start through service instances
OR
b. Using command prompt
i. C:\ticbco\ems\bin\tibemsd.exe config tibemsd.conf
6. Login to EMS Admin tool on EMS-SERVERA using admin credentials
7. Create route on EMS-SERVERA as follows
a. Create route EMS-SERVERB url=tcp://localhost:7224
3. Start EMS-SERVERB
a. Using command prompt
i.C:\ticbco\ems\bin2\tibemsd.exe config tibemsd.conf
4. You will see route established between these two servers, you can check in the logs or by using the
following command in admin console in either of the servers.
a. show routes
5. create global queue or topic on these two instances
a. create global topics on both the servers as follows (make sure the name matches for topics)
i. create topic testroute global
b. create global queues on both the servers as follows
i. In EMS-SERVERA

1.create queue testroute global


ii. In EMS-SERVERB
1. create queue testroute@EMS-SERVERA global
6. Test or change the topic/queue names using a sample BW application.
7. There you go with success results in routing

Fault Tolerance

Note:The Ems data store should be in SAN or NAS,in actual Production


Environment..so that the datastore is accessible by both primary and back
up server
SAN-Storage Area Network
NAS-Network Area storage
But for our case we would use just operating system file system (shared by
both primary and Backup server)
Fault Tolerance configuration setup
Parameters will be in Bold and Inclined for easy identification
Configuring Primary server
open the c:\tibco\ems\bin\tibemsd.conf
configuration file)

(This file is called Ems

Server=EMS-SERVER-RAMU(This value is upto your choice)


Listen=tcp://7222(This value is upto uour choice)
Ft_active=tcp://7444(This value is upto your choice)

Configuring Backup server


Create a folder called Backup in that please copy all the *.conf files(only
configuration files) from c:\tibco\ems\bin\ and place it in
c:\tibco\ems\bin\Backup\
Note:From now we will work in the Backup Folder, open tibemsd.conf file in
the folder
Server=EMS-SERVER-RAMU(This value must match the value of
the server parameter in primary server's tibemsd.conf file)
Listen=tcp://7444(This value must match the value in Ft_active paramter

in primary server's tibemsd.conf file)


Ft_active=tcp://7222(This value must match the value in Listen parameter
in primary server's tibemsd.conf file)
store=c:\tibco\ems\bin\datastore(This value must match the value
in store parameter in primary server's tibemsd.conf file,note that the value
in primary server's tibemsd.conf file is just datastore)

Prepend this path to


sever tibemsd.conf

c:\tibco\ems\bin\Backup\

below list in the backup

users=c:\tibco\ems\bin\Backup\users.conf
groups=c:\tibco\ems\bin\Backup\groups.conf
topics=c:\tibco\ems\bin\Backup\topics.conf
queues=c:\tibco\ems\bin\Backup\queues.conf
acl_list=c:\tibco\ems\bin\Backup\acl.conf
factories=c:\tibco\ems\bin\Backup\factories.conf
routes=c:\tibco\ems\bin\Backup\routes.conf
bridges=c:\tibco\ems\bin\Backup\bridges.conf
transports=c:\tibco\ems\bin\Backup\transports.conf
tibrvcm=c:\tibco\ems\bin\Backup\queues.conf
durables=c:\tibco\ems\bin\Backup\durables.conf

Load balancing :

This topic deals with configuring both Primary and Load Balanced Server
Note:All the parameters will be in Bold and Italic that you are going to use for Load
Balancing
Configuring Primary Server
In this we are going to use 3 files which are given below for configuring Primary
server
1) tibemsd.conf
2) routes.conf
3) factories.conf

Go to location c:\tibco\ems\bin you can find the above listed files.


Open tibemsd.conf file and input the parameters with the Values
Server=EMS-SERVER1(This value can be anything)
Routing=enabled(Thisvalue should be same )
store=datastore(which contain 3 files sync-db,async-db,meta-db)
Save the file and exit
Open routes.conf file and input the parameters with the values,
Note: if the paramter is not there add it.
When you go to bottom of this file you will find the below parameters
[EMS-SERVER2] This should be there by default(Note:Ensure that this parameter is
used in Load Balanced server, should be same name as that in LB Server)
url=tcp://7144
(change the default port number to your
requirement)
zone_name=default_mhop_zone (Add this parameter and value)
zone_type=mhop
(Add this parameter, the value should be mhop or
shop,depends upon the requirement)
save and exit this file
Open the factories.conf file
Important Note:
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#

If factory's url is specified in the form


url = tcp://7222

(or any other port number)

then it is expanded during JNDI lookup to include the default


hostname of the machine running tibemsd server, for example:
tcp://MYHOST:7222
This enables the use of the same factories.conf file on different
hosts. However, note that only default host name will be used. On
servers with multiple interfaces you need to use explicit host name
in factories url if it should be not the default name.
Factories using 'localhost' as the host name only work when the client

# and server are on the same computer. You will need to replace
# 'localhost' below with the the appropriate hostname of the machine
# where the server is running.
Add the following parameters, these parameters are not there in the file
[LBTopicConnectionFactory]
url=tcp://7222|tcp://7144 (From the above note actual production scenario use
url=tcp://Machine1:7222|tcp://Machine2:7144)
metric=connections
[LBQueueConnectionFactory]
url=tcp://7222|tcp://7144 (From the above note actual production scenario use
url=tcp://Machine1:7222|tcp://Machine2:7144)
metric=connections
Save and exit the configuration file
Configuration of Load Balanced server for primary
server
Create LB Directory in c:\tibco\ems\bin
Create datastore2 Directory in c:\tibco\ems\bin\LB
Copy the *.conf files from c:\tibco\ems\bin
to
c:\tibco\ems\bin\LB (only the
configuration files)
Copy the datastore files from c:\tibco\ems\bin\datastore to
c:\tibco\ems\bin\LB\datastore2 (There would be 3 files)
Note: From Now on we will work in LB Directory
The 2 files that we are going to use for Load Balancing server is tibemsd.conf and
routes.conf files
open the file c:\tibco\ems\bin\LB\tibemsd.conf set the below parameteres with
appropriate values
server=Ems-server2
Listen=tcp://7144
users=c:/tibco/ems/bin/LB/users.conf ( Note:or go for this path "\" if the other
doesn't work)
groups=c:/tibco/ems/bin/LB/groups.conf

topics=c:/tibco/ems/bin/LB/topics.conf
queues=c:/tibco/ems/bin/LB/queues.conf
acl_list=c:/tibco/ems/bin/LB/acl.conf
factories=c:/tibco/ems/bin/LB/factories.conf
routes=c:/tibco/ems/bin/LB/routes.conf
tibrvcm=c:/tibco/ems/bin/LB/tibrvcm.conf
durables=c:/tibco/ems/bin/LB/durables.conf
store=c:/tibco/ems/bin/LB/datastore2
Note:The reason why we are giving this path in LB Server is because the tibemsd
application knows where to look for the files when you execute tibemsd in primary
server, but for LB Sever tibemsd application is in bin and the files for that are in
different folder.
Open routes.conf file from location c:\tibco\ems\bin\LB\routes.conf
Go to the bottom of the file and modify them as below if anything is there or add it if
it is not there (Reason for this is we just copied the files that have been chaned for
primary server)

[EMS-SERVER1]
url=tcp://7222(This value sould be of primary server listen port)
zone_name=default_mhop_zone
zone_type=mhop
Save and exit the file

S-ar putea să vă placă și