The below setup demonstrates the process of setting multiple Tibco instances in one server/machine. Creating a global queue in one occurrence and routed queues in second occurrences.
Benefits of Global & and routed/proxy queues:
- High availability of consumer applications.
- Never lose the EMS message.
- Avoid duplicates.
We will be doing the following things to instantiate routed/proxy queues.
Changing server names, enabling route, creating a Route, setting up multiple ports, creating users on all Servers for Routing, Create Proxy Receiver/Routing Queue and global Queue.
EMS server Setup
Server A (default – 7222)
Step 1 – Edit port
Open C:\tibco\ems\8.1\data\tibemsd.conf file
Change server name from EMS-SERVER to EMS-SERVERA
Change routing = enabled
Server B – 7223
Step 1 – EMS Copy
Make a copy for the C:\tibco\ems\8.1 folder as 8.1.1
Step 2 – Configuration files
Copy folder C:\ProgramData\TIBCO_HOME\tibco\cfgmgmt\ems\data into C:\tibco\ems\8.1.1
Step 3 – Edit tibemsd.conf
Open tibemsd.conf file under C:\tibco\ems\8.1.1\data
Replace following things
Change server name from EMS-SERVER to EMS-SERVERB
Change routing = enabled
tcp://7222 –> tcp://7223
C:/ProgramData/TIBCO_HOME/tibco/cfgmgmt/ems –> C:/tibco/ems/8.1.1
Step 4 – Edit factories. conf
Open factories. conf file under C:\tibco\ems\8.1.2\data
Change the port to 7223 instead of 7222
server C – 7224
Step 1 – EMS Copy
Make a copy for the C:\tibco\ems\8.1 folder as 8.1.2
Step 2 – Configuration files
Copy folder C:\ProgramData\TIBCO_HOME\tibco\cfgmgmt\ems\data into C:\tibco\ems\8.1.2
Step 3 – Edit tibemsd.conf
Open tibemsd.conf file under C:\tibco\ems\8.1.2\data
Replace following things
Change server name from EMS-SERVER to EMS-SERVERC
Change routing = enabled
tcp://7222 –> tcp://7223
C:/ProgramData/TIBCO_HOME/tibco/cfgmgmt/ems –> C:/tibco/ems/8.1.2
Step 4 – Edit factories.conf
Open factories.conf file under C:\tibco\ems\8.1.2\data
Change the port to 7224 instead of 7222
EMS Servers start
Start EMS-SERVERB
Open the command prompt and run the following commands
>cd C:\tibco\ems\8.1.1\bin
>tibemsd.exe -config ../data/tibemsd.conf
Start EMS-SERVERC
Open the command prompt and run the following commands
>cd C:\tibco\ems\8.1.2\bin
tibemsd.exe -config ../data/tibemsd.conf
Connect to EMS servers & Create routes
EMS-SERVERA (Default)
Open the command prompt and run the following commands
>C:\tibco\ems\8.1\bin\tibemsadmin.exe
>connect
tcp://localhost:7222> create route EMS-SERVERB url=tcp://localhost:7223
tcp://localhost:7222> create route EMS-SERVERC url=tcp://localhost:7224
tcp://localhost:7222> Create queue RouteQueue global
EMS-SERVERB
Open a command prompt and run the following commands
>C:\tibco\ems\8.1.1\bin\tibemsadmin.exe
>c tcp://localhost:7223
tcp://localhost:7223> create route EMS-SERVERA url=tcp://localhost:7222
tcp://localhost:7223> create queue RouteQueue@EMS-SERVERA global
EMS-SERVERC
Open the command prompt and run the following commands
>C:\tibco\ems\8.1.2\bin\tibemsadmin.exe
>c tcp://localhost:7224
tcp://localhost:7224> create route EMS-SERVERA url=tcp://localhost:7222
tcp://localhost:7224> create queue RouteQueue@EMS-SERVERA global
Java services start
java -jar -Dserver.port=9083 -Dtibco.ems.url=tcp://localhost:7223 target/sample-consumer.jar
java -jar -Dserver.port=9084 -Dtibco.ems.url=tcp://localhost:7224 target/sample-consumer.jar
You may also like to know: Installing SonarLint Plugin to IntelliJ Idea