The purpose of this lab to demonostrate the benefit of using Aspera fasp.io Gateway with IBM MQ over TCP.
At a high level, we will be using two VM’s, one in United States as LOCALQM, and another in different GEO as REMOTEQM.
You will be testing two usecases.
a) Send large messages with MQ with TCP
b) Send large messages with MQ with FASP over TCP

When you first login to the VDI this will be considered your REMOTEQM. We will need to add ports to the firewall and start it.
NOTE: You will need to use sudo so will use the password for that which was used to sign in.
sudo firewall-cmd --add-port=1414/tcp
sudo firewall-cmd --add-port=1600/udp
sudo systemctl start firewalld
You will need to capture the ip address of the REMOTEQM server. This will be used when we setup the channel on the LOCALQM.
Run the following command and save the IP address for eth1.
ifconfig

Now we will create and start the QMgrs.
On the VDI that was assigned to you we will create the remote Qmgr.
Run the following commands to create and start the QMgr.
crtmqm REMOTEQM
strmqm REMOTEQM
We will now use the runmqsc command to create the needed objects.
runmqsc REMOTEQM
alter qmgr chlauth(disabled)
alter qmgr connauth(' ')
refresh security (*)
def listener(listener.1414) trptype(tcp) port(1414) control(qmgr)
start listener(listener.1414)
dis lsstatus(listener.1414)
def chl(LOCAL.REMOTE) chltype(rcvr)
def qlocal(TCP.IN) maxdepth(100000) maxmsgl(104857600)
When you login to RDRQM2 node this will be considered your LOCALQM. We will need to add ports to the firewall and start it.
NOTE: You will need to use sudo so will use the password for that which was used to sign in.
sudo firewall-cmd --add-port=1414/tcp
sudo firewall-cmd --add-port=1520/udp
sudo firewall-cmd --add-port=1600/udp
sudo systemctl start firewalld
Now we will create and start the QMgrs on the RDQM2 node we will create the local Qmgr.
Run the following commands to create and start the QMgr.
crtmqm LOCALQM
strmqm LOCALQM
We will now use the runmqsc command to create the needed objects.
runmqsc LOCALQM
Now copy the following commands from the command line in runmqsc.
alter qmgr chlauth(disabled)
alter qmgr connauth(' ')
refresh security (*)
def listener(listener.1414) trptype(tcp) port(1414) control(qmgr)
start listener(listener.1414)
dis lsstatus(listener.1414)
DEF QLOCAL(REMOTE) USAGE(XMITQ) INITQ(SYSTEM.CHANNEL.INITQ) TRIGDATA(WDC.LDN)
def qremote(REMOTE.TCP.IN) rname(TCP.IN) rqmname(REMOTEQM) xmitq(REMOTE)
Now for defining the Sender channel you will need to replace the yy.yy.yy.yy with the ip you saved from the VDI in the last section.
def chl(LOCAL.REMOTE) chltype(sdr) conname('168.1.53.230(1414)') XMITQ(REMOTE)
Now we will start the channel and check the channel status.
START CHL(LOCAL.REMOTE)
dis chstatus(LOCAL.REMOTE)
Now we will test to make sure that the MQ TCP/IP channels are working between the QMgrs.
On the rdqm2 local Qmgr put a test message.
/opt/mqm/samp/bin/amqsput REMOTE.TCP.IN LOCALQM
Go to the REMOTEQM running on the VDI and you can use MQ Explorer to view queues or run the following command.
/opt/mqm/samp/bin/amqsget TCP.IN REMOTEQM

Now we will setup a watch on the REMOTEQM on the VDI to monitor how long it takes to get messages.
watch -n 1 'echo "dis qlocal(TCP.IN) curdepth" | runmqsc REMOTEQM'

Now we will Blast 1000 messages (1MB each) on the rdqm2 LOCALQM.
NOTE: Check clock before blasting messages.
/opt/mqm/samp/bin/amqsblst LOCALQM REMOTE.TCP.IN -W -s 1048576 -c 1000
WRITE DOWN THE TIME TAKEN TO TRANSFER 1000 MESSAGES TO REMOTEQM TCP.IN queue.
**Note: Should be around 3:00 minutes.
Now we will configure the fasp.io gateway to see the time it takes to move messages to the RemoteQM

Update gateway.toml
sudo vi /usr/local/etc/faspio/gateway.toml
You will only need to change the Forward IP to match the IP of the VDI.

Update gateway.toml
You will change both IPs to match the IP of the VDI.

Run the following commands on both the rdqm2 node and the VDI.
sudo systemctl enable faspio-gateway
sudo systemctl start faspio-gateway
sudo systemctl status faspio-gateway
Note: Make sure the fasp.io gateway is started successfully.
On the VDI run the following commands to create the needed MQ objects. First run the runmqsc command
runmqsc REMOTEQM
Copy and paste the following commands.
def chl(LOCAL.REMOTE.FASP) chltype(rcvr)
def qlocal(FASP.IN) maxdepth(100000) maxmsgl(104857600)
On the rdqm2 node run the following commands to create the needed MQ objects. First run the runmqsc command
runmqsc LOCALQM
Copy and paste the followng commands.
Define channel(LOCAL.REMOTE.FASP) chltype(sdr) conname('10.0.0.2(1520)') xmitq(REMOTE.FASP)
DEF QLOCAL(REMOTE.FASP) USAGE(XMITQ) INITQ(SYSTEM.CHANNEL.INITQ) TRIGDATA(LOCAL.REMOTE.FASP)
def qremote(REMOTE.FASP.IN) rname(FASP.IN) rqmname(REMOTEQM) xmitq(REMOTE.FASP)
def listener(listener.1520) trptype(tcp) port(1520) control(qmgr)
start listener(listener.1520)
Now run the following two commands to start channel and check status.
START CHL(LOCAL.REMOTE.FASP)
Dis chstatus(LOCAL.REMOTE.FASP)
Now we will setup a watch on the REMOTEQM on the VDI to monitor how long it takes to get messages.
watch -n 1 'echo "dis qlocal(FASP.IN) curdepth" | runmqsc REMOTEQM'

Now we will Blast 1000 messages (1MB each) on the rdqm2 LOCALQM.
NOTE: Check clock before blasting messages.
/opt/mqm/samp/bin/amqsblst LOCALQM REMOTE.FASP.IN -W -s 1048576 -c 1000
WRITE DOWN THE TIME TAKEN TO TRANSFER 1000 MESSAGES TO REMOTEQM FASP.IN queue.
**Note: Should be around 2:00 minutes.
Note:
WRITE DOWN THE TIME TAKEN TO TRANSFER 1000 MESSAGES TO REMOTE FASP.IN queue. OBSERVE THE DIFFERENCE between a TCP Transfer & a FASP Transfer.
You should see 60-65% better performance using Aspera fasp.io gateway. Also you will not saturate the network which can occur when running on TCP/IP