IBM's MQ Usage guide

Source: Internet
Author: User
Tags define local mqseries


With the development of computer network and distributed application, remote message transmission is becoming an indispensable part of application system.

The emergence of commercial message middleware ensures the reliability, high efficiency and security of message transmission, and also reduces the development cycle of the system.

Currently, the most widely used message middleware products are IBM MQSeries.

The Dongfeng piping System is communicated through MQ.
In this paper, the basic operation and configuration of MQ is elaborated in detail, hoping to help readers. 
A MQ Basic Operations 
There are several important components in MQ: Queue Managers (QueueManager), queues, and channels (channel). Its basic operating methods are as follows: 
Create a Queue Manager 

Crtmqm–q Qmgrname 
-Q refers to creating a default queue Manager 
To delete a queue Manager 
DLTMQM Qmgrname 
Start the Queue Manager 
STRMQM Qmgrname 
If you are starting the default Queue manager, you can do so without its name 
Stop Queue Manager 
ENDMQM Qmgrname controlled stop 
Endmqm–i Qmgrname immediately stop 
Endmqm–p qmgrname Force Stop 
Show Queue Manager 

Dspmq–m Qmgrname 
Run the MQSeries command 

RUNMQSC qmgrname 

If it is the default queue manager, you can not take its name 
Put a message in the queue 

amqsput QName qmgrname If the queue 

is a queue in the default Queue manager, you can not take the name of its queue manager 
Remove a message from 

a queue amqsget QName qmgrname If the queue 

is a queue in the default Queue manager, you can not take the name of its queue manager 
Start channel 

runmqchl–c chlname–m qmgrname 
Start listening 

runmqlsr–t type–p port–m qmgrname 
Stop listening 

endmqlsr-m qmgrname 
MQSeries Command 
Define dead-letter queue 

DEFINE qlocal (QNAME) defpsist (YES) REPLACE 
Setting the queue Manager's dead-letter queue 

ALTER QMGR DEADQ (QNAME) 
Define local queue 

DEFINE QL (QNAME) REPLACE 
Define alias queue 

DEFINE QALIAS (qaliasname) targq (QNAME) 
Remote Queue definition 

DEFINE QREMOTE (qrname) + 

rname (AAA) rqmname (qmgrname) + 

XMITQ (qtname) 
Define model Queue 

DEFINE Qmodel (QNAME) Deftype (Tempdyn) 
Define local transport queue 

DEFINE qlocal (qtname) USAGE (XMITQ) defpsist (YES) + 

INITQ (SYSTEM.CHANNEL.INITQ) + 

PROCESS ( PROCESSNAME) REPLACE 
Create process definition 

DEFINE process (proname) + 

DESCR (' STRING ') + 

Appltype (windowsnt) + 

applicid (' Runmqchl-c Sdr_test-m qm_ TEST ') 

where the value of Appltype can be: CICS, UNIX, WINDOWS, WindowsNT, etc. 
Create sender Channel 

DEFINE Channel (sdrname) Chltype (SDR) + 

CONNAME (' 100.100.100.215 (1418) ') XMITQ (qtname) REPLACE 

The Chltype can be: SDR, SVR, RCVR, Rqstr, Clntconn, SVRCONN, CLUSSDR, and CLUSRCVR. 
Create receiver Channel 

DEFINE channel (sdr_ TEST) chltype (RCVR) REPLACE 
Create a server connection channel 

DEFINE channel (svrconnname) Chltype (SVRCONN) REPLACE 
Show all properties of a queue display queue 

(QNAME) [All] 
Displays the selected properties of the queue display queue 

(QNAME) DESCR GET PUT 

DISPLAY Queue (QNAME) MAXDEPTH curdepth 
Display all properties of the Queue Manager display 

QMGR [all] 
Show process definition display processes 

(proname) 
Change Properties 

alter QMGR DESCR (' NEW DESCRIPTION ') 

alter qlocal (QNAME) PUT (DISABLED) 

alter QALIAS (QNAME) Targq (Targqname) 
Delete a queue delete 

qlocal (QNAME) 

Delete QREMOTE (qrname) 
Clears all messages in the queue 

clear qlocal (QNAME) 

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.