Formerly known as MQ Series
Convert the rpm's with
alien --scripts
before installing. This creates the right directories and permissions (and makes MQ Explorer work), but you should be aware that running the converted installation script from the RPM packages could have unwanted side effects.
You could need to raise some limits for the mqm user/group. Try with:
@mqm soft stack unlimited
in a /etc/security/limits.d/mqm.conf file.
You may need to raise some of the kernel limits (i.e. semaphores)
To check for the right values you can use the mqconfig script provided by IBM.
Here's a listo of MQ7 Reason Codes
Start the QM
strmqm <QUEUE_MANAGER>
Stop the QM
endmqm <QUEUE_MANAGER>
List all the defined QMs
dspmq
Start the command line console
runmqsc <QUEUE_MANAGER>
crtmqm -u SYSTEM.DEAD.LETTER.QUEUE <QUEUE_MANAGER>
Via runmqsc:
DEFINE CHANNEL(<CHANNEL_NAME>) CHLTYPE(SVRCONN) MCAUSER('mqm')
DEFINE LISTENER(<LISTENER_NAME>) TRPTYPE(TCP) CONTROL(QMGR) PORT(141XX)
START LISTENER(<LISTENER_NAME>)
endmqm <QUEUE_MANAGER> dltmqm <QUEUE_MANAGER>
echo "DISPLAY LISTENER(*) PORT" |\ runmqsc <QUEUE_MANAGER>
echo "DISPLAY CONN(*) APPLTAG CONNAME" | runmqsc <QUEUE_MANAGER> | grep "APPLTAG"
echo "DISPLAY CHSTATUS(*) ALL" | runmqsc <QUEUE_MANAGER> | grep "CONNAME" | cut -f 2 -d "("
Edit qm.ini (in /var/mqm/qmgrs/QM_NAME/) and add the following stanza:
Channels: MaxChannels=nn
The default is 100.
Edit `qm.ini` (in `/var/mqm/qmgrs/QUEUE_MANAGER/`) and add the following stanza:
TCP: KeepAlive=Yes
Note that TCP keepalive support must be activated at OS/kernel level.
It also shows the total number of active connections.
DISPLAY QMSTATUS ALL
DISPLAY QSTATUS(<QUEUE>)
…excluding the system objects.
With solaris use nawk(1): /usr/xpg4/bin/awk
MYQM=MYQUEUEMGR
AWK=awk
echo "DISPLAY QLOCAL(*) WHERE (CURDEPTH GT 0)" |\
runmqsc $MYQM |\
$AWK '/QUEUE\(SYSTEM./{next} /QUEUE/{sub("QUEUE","QLOCAL"); print "CLEAR",$1} END {print "END"}' |\
runmqsc $MYQM
If you have “stubborn” messages you cannot delete (part of a distributed transaction) and you need to force the rollback:
ALTER LISTENER(LISTENERNAME) TRPTYPE(TCP) CONTROL(MANUAL)
dspmqtrn -m $MYQM | awk '/^AMQ7056/ {print $4}' |\
sed 's/\.//' | while read tr ; do
rsvmqtrn -m $MYQM -b $tr
done
ALTER LISTENER(LISTENERNAME) TRPTYPE(TCP) CONTROL(QMGR)
MYQM=MYQUEUEMGR
AWK=awk
echo "DISPLAY QLOCAL(*)" |\
runmqsc $MYQM |\
$AWK '/QUEUE\(SYSTEM./{next} /QUEUE/{sub("QUEUE","QLOCAL"); print "DELETE",$1} END {print "END"}' |\
runmqsc $MYQM
echo "DISPLAY QALIAS(*)" |\
runmqsc $MYQM |\
$AWK '/QUEUE\(SYSTEM./{next} /QUEUE/{sub("QUEUE","QALIAS"); print "DELETE",$1} END {print "END"}' |\
runmqsc $MYQM
DEFINE QREMOTE(QREM) +
RNAME(QLOC) +
RQMNAME(QM2) +
XMITQ(QM2.XMITQ)
DEFINE QLOCAL(QM2.XMITQ) +
INITQ(SYSTEM.CHANNEL.INITQ) +
USAGE (XMITQ) +
TRIGGER +
TRIGDATA(QM1.TO.QM2) +
TRIGTYPE(FIRST)
DEFINE CHANNEL(QM1.TO.QM2) +
CHLTYPE(SDR) +
TRPTYPE(TCP) +
XMITQ(QM2.XMITQ) +
CONNAME('1.2.3.4(1234)')
DEFINE QLOCAL (QLOC)
DEFINE CHANNEL(QM1.TO.QM2) +
CHLTYPE(RCVR) +
TRPTYPE(TCP)
With clustering basically you automate the creation of the remote queues on the queue managers part of the cluster. For the details see the IBM Queue Manager Clusters manual.
Following, a sample of a cluster composed by 3 Queue Managers. In each cluster you should have two QM holding the Full Repository. In the sample those are QM1 and QM2.
In each QM we define a cluster queue; plus we have a Load Balanced queue that is seen globally and that is local only to QM2 and QM3.
Local IP is 1.1.1.1
* We hold the Full Repository
ALTER QMGR REPOS(MYCLUSTER)
DEFINE CHANNEL(TO.QM1) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) +
CONNAME('1.1.1.1(14141)') CLUSTER(MYCLUSTER) +
DESCR('Cluster-receiver channel for QM1')
DEFINE CHANNEL(TO.QM2) CHLTYPE(CLUSSDR) TRPTYPE(TCP) +
CONNAME('2.2.2.2(14142)') CLUSTER(MYCLUSTER) +
DESCR('Cluster-sender channel from QM1 to repository at QM2')
* Cluster Queue
DEFINE QLOCAL(QCLU1) CLUSTER(MYCLUSTER)
Local IP is 2.2.2.2
* We hold the Full Repository
ALTER QMGR REPOS(MYCLUSTER)
DEFINE CHANNEL(TO.QM2) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) +
CONNAME('2.2.2.2(14142)') CLUSTER(MYCLUSTER) +
DESCR('Cluster-receiver channel for QM2')
DEFINE CHANNEL(TO.QM1) CHLTYPE(CLUSSDR) TRPTYPE(TCP) +
CONNAME('1.1.1.1(14141)') CLUSTER(MYCLUSTER) +
DESCR('Cluster-sender channel from QM2 to repository at QM1')
* Cluster Queue
DEFINE QLOCAL(QCLU2) CLUSTER(MYCLUSTER)
* Load balanced queue
DEFINE QLOCAL(QBAL) CLUSTER(MYCLUSTER) CLWLUSEQ(ANY)
Local IP is 3.3.3.3
DEFINE CHANNEL(TO.QM3) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) +
CONNAME('3.3.3.3(14143)') CLUSTER(MYCLUSTER) +
DESCR('Cluster-receiver channel for QM3')
* We connect to QM1 fo the Full Repository
DEFINE CHANNEL(TO.QM1) CHLTYPE(CLUSSDR) TRPTYPE(TCP) +
CONNAME('1.1.1.1(14141)') CLUSTER(MYCLUSTER) +
DESCR('Cluster-sender channel from QM3 to repository at QM1')
* Cluster Queue
DEFINE QLOCAL(QCLU3) CLUSTER(MYCLUSTER)
* Load balanced queue
DEFINE QLOCAL(QBAL) CLUSTER(MYCLUSTER) CLWLUSEQ(ANY)
Start the graphical Eclipse-based interface with
strmqcfg
Configuration files:
/var/mqm/qmgrs/<QUEUE_MANAGER>/qm.ini
Error logs:
/var/mqm/qmgrs/<QUEUE_MANAGER>/errors/AMQ*.LOG