Enables 2 MQ servers to communicate with each other

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.