mqserver1:10.13.106.36
mqserver2:10.13.106.37
1, the realization MQServer2 sends the message to MQServer1:
MQServer1 create queues, channels, and listeners:
CRTMQM QM_APPLESTRMQM Qm_apple
RUNMQSC qm_appledefine qlocal (Q1) define channel (Qm_orange. Qm_apple) Chltype (RCVR) trptype (TCP) Alter Listener (SYSTEM.DEFAULT.LISTENER.TCP) trptype (TCP) port (1414) Start Listener (SYSTEM.DEFAULT.LISTENER.TCP) end
MQServer2 creating queues and channels:
CRTMQM QM_ORANGESTRMQM Qm_orange
RUNMQSC qm_orangedefine qlocal (qm_apple) usage (XMITQ) define Qremote (Q1) rname (Q1) rqmname (qm_apple) XMITQ (qm_apple) Define channel (Qm_orange. Qm_apple) Chltype (SDR) conname (' 10.13.106.36 (1414) ') XMITQ (qm_apple) trptype (TCP) Start channel (Qm_orange. Qm_apple) End
# The transmission queue to be used by the XMITQ
# usage XMITQ is the transmit queue
MQServer2 Send message:
-bash-4.1$ amqsput Q1 qm_orangesample AMQSPUT0 starttarget queue is Q1hello mqserver1sample AMQSPUT0 end-bash-4.1$
MQServer1 Receive Message:
-bash-4.1$ amqsget Q1 qm_applesample AMQSGET0 startmessage
2, the realization MQServer1 sends the message to MQServer2:
MQSERVER2 create queues, channels, and listeners:
RUNMQSC qm_appledefine qlocal (Q2) define channel (Qm_apple. Qm_orange) Chltype (RCVR) trptype (TCP) Alter Listener (SYSTEM.DEFAULT.LISTENER.TCP) trptype (TCP) port (1414) Start Listener (SYSTEM.DEFAULT.LISTENER.TCP) end
MQServer1 creating queues and channels:
RUNMQSC qm_orangedefine qlocal (qm_orange) usage (XMITQ) define Qremote (Q2) rname (Q2) rqmname (qm_orange) XMITQ (qm_orange ) define channel (Qm_apple. Qm_orange) Chltype (SDR) conname (' 10.13.106.36 (1414) ') XMITQ (qm_orange) trptype (TCP) Start channel (Qm_apple. Qm_orange) End
Enables 2 MQ servers to communicate with each other