Tibco EMS Load Balancing
Tibco EMS Load Balancing
Tibco EMS Load Balancing
This Document is intended to give the reader insight into the configurations necessary to
achieve Load-Balancing with TIBCO Enterprise Message System (TIBCO EMS) without the use
of specialized hardware. This Document is not intended to convey Best-Practices, but rather
how to achieve the product-specific goals of Load-Balancing.
In the document, we will configure TIBCO Enterprise Message Service from building a set of
load-balanced environment. The solution can be built on a single machine and tested.
To make LB work, you need to route between servers, so a new EMS Server Name needs to
be used, and Topics and Queues need to be routed between these instances. Queues are
restricted to a single hop, while Topics can be multi-hop for their routes. Overall, we will be
configuring the EMS Daemons, configuring appropriate JMS Factories, configuring routes, and
creating Topics and Queues.
Creating Two EMS Servers on One Machine:
To create two servers on a single machine follow the below steps:
= EMS-SERVER1
users
groups
topics
queues
acl_list
factories
routes
bridges
transports
tibrvcm
durables
=
=
=
=
=
=
=
=
=
=
=
C:/tibco/ems1/users.conf
C:/tibco/ems1/groups.conf
C:/tibco/ems1/topics.conf
C:/tibco/ems1/queues.conf
C:/tibco/ems1/acl.conf
C:/tibco/ems1/factories.conf
C:/tibco/ems1/routes.conf
C:/tibco/ems1/bridges.conf
C:/tibco/ems1/transports.conf
C:/tibco/ems1/tibrvcm.conf
C:/tibco/ems1/durables.conf
store
= C:/tibco/ems1/datastore1
listen
= tcp://7223
routing
= enabled
Do the same thing in the ems2 server also. But in ems2 change the server name to
EMS-SERVER2. And the path of the .conf files. Change the listen parameter to
tcp://7224(i.e ems server1 is running on port 7223 and ems server2 is running on port
7224).
Configuring factories.conf files. Add the below parameters at the end of the file.in both
ems1 and ems2 folders factories.conf file.
[LBTopicConnectionFactory]
type
= topic
url
= tcp://7223|tcp://7224
metric
= connections
[LBQueueConnectionFactory]
type
= queue
url
= tcp://7223|tcp://7224
metric
= connections
Starting the both the ems servers.To start the ems servers open command prompt.and go to the
bin folder location of the installed ems( c:\tibco\ems\bin.).Start both the ems servers from two
separate command prompt windows.
Run the command syntax:tibemsd config <location of the tibemsd.conf file of each server>
Systax: tibemsd config C:\tibco\ems1\tibemsd.conf
Create a global topic victor in both the ems servers ems1 and ems2.
Syntax: create topic victor global
Create routes in both the servers ems1 and ems2 with the same name route1.Instead of
01hw282048 you have to give your machine name or IP address of your machine on which you
are configuring your ems servers.
Syntax: create route route1 url:tcp://01hw282048:7224
Syntax: create route route1 url:tcp://01hw282048:7223
Now the Setup is ready from the EMS server side view.
Creating BW project:
Create 4 JMS connections to the ems server1.
In the configuration tab of the JMS connections provide different names to all the different type of
connection like admin1,admin2,admin3,admin4.
In the advance tab of the JMS connection provide the correct name of the Topic Connection
Factory and Queue Connection Factory.
Now create 4 Process definitions and in each process definitions create one Topic publisher.
Assign different JMS connections to each of the Process definition Topic Publisher.
Select Destination topic as victor that we have created as a global topic.
Provide the input in the input tab of the JMS Topic publisher.
These 4 messages have been divided in 2 messages on each server on the global topic.
Now we can say that the messages have been load balanced on both the servers.