| home / infca / mq (navigation links) | El placer da lo que el pensamiento promete - Voltaire |
| AMQMDAIN | Open count | Create MQ | Start channel | v 6.0, v 7.0 (ext) | RCs | Best Practices | QN resolution | Guidelines | Other | URLs | End |
Read some (v6) Fundamentals.
Hardware requirements of MQ Server on Windows
Hardware requirements of MQ Explorer
If you want to use the MQ Explorer, you will need a minimum of:MQ for Windows v 6.0 Quick Beginnings, amqtac05.pdf
Software requirements of MQ Server on Windows
Hardware requirements of MQ server on Solaris
MQ for Sun Solaris, Version 6.0 runs on all Sun SPARC and Sun UltraSPARC desktop and server systems, supported by the appropriate release of the Solaris operating environment.
Hardware
MQ for Linux, Version 6.0 (x86 platform) runs on any machine that
supports the x86 machine architecture.
MQ for Linux, Version 6.0 (x86-64 platform) runs on any machine that
supports the x86-64 (AMD64 or Intel© EM64T) machine architecture.
MQ for Linux, Version 6.0 (POWER platform) runs on any machine
that supports the POWER machine architecture.
MQ for Linux, Version 6.0 (zSeries platform) runs on any machine that
supports the zSeries machine architecture.
MQ for Linux, Version 6.0 (zSeries s390x platform) runs on any
machine that supports the zSeries s390x machine architecture.
Operating System
MQ for Linux, Version 6.0 (x86 platform)
has been tested with the following distributions:
|
| Command name | Purpose |
|---|---|
| amqccert | Check certificate chains |
| amqmdain | Configure or control WebSphere MQ services (Windows® systems only) |
| amqoamd | Output setmqaut commands |
| amqtcert | Transfer certificates |
| crtmqcvx | Convert data |
| crtmqm | Create a local queue manager |
| dltmqm | Delete a queue manager |
| dmpmqaut | Dump authorizations to an object |
| dmpmqlog | Dump a log [url] |
| dspmq | Display queue managers |
| dspmqaut | Display authorizations to an object |
| dspmqcsv | Display the status of a command server |
| dspmqfls | Display file names |
| dspmqras | |
| dspmqrte | Display route application |
| dspmqtrc | Display formatted trace output (UNIX® systems only) |
| dspmqtrn | Display details of transactions [pareja de rsvmqtrn] |
| dspmqver | Display version number |
| endmqbrk | |
| endmqcsv | Stop the command server on a queue manager |
| endmqdnm | Stop .NET monitor |
| endmqlsr | Stop the listener process on a queue manager |
| endmqm | Stop a local queue manager |
| endmqtrc | Stop tracing for an entity |
| ffstsummary | |
| mqftapp | Run the File Transfer Application |
| mqftrcv | Receive file using the File Transfer Application (server) |
| mqftrcvc | Receive file using the File Transfer Application (client) |
| mqftsnd | Send file using the File Transfer Application (server) |
| mqftsndc | Send file using the File Transfer Application (client) |
| rcdmqimg | Write an image of an object to the log {sg24-5222} |
| rcrmqobj | Recreate an object from their image in the log {sg24-5222} |
| rsvmqtrn | Commit or back out a transaction [pareja de dspmqtrn] |
| runmqbrk | |
| runmqchi | Start a channel initiator process |
| runmqchl | Start a sender or requester channel |
| runmqckm | |
| runmqdlq | Start the dead-letter queue handler |
| runmqdnm | Run .NET monitor |
| runmqlsr | Start a listener process |
| runmqsc | Issue MQSC commands to a queue manager |
| runmqtmc | Invoke a trigger monitor for a client (AIX® clients only) |
| runmqtrm | Invoke a trigger monitor for a server |
| setmqaut | Change authorizations to an object |
| setmqcrl | Set certificate revocation list (CRL) LDAP server definitions (Windows® systems only) |
| setmqprd | Enroll production license |
| setmqscp | Set service connection points (Windows® systems only)
Publish the client-connection channel definitions in Active Directory instead of using environment variables MQCHLLIB and MQCHLTAB |
| strmqcsv | Start the command server for a queue manager |
| strmqm | Start a local queue manager |
| strmqtrc | Enable tracing |
url, o chapter 17, "Control Commands", llibre MQ v 6.0 System Admin Guide, amqzag08.pdf, SC34-6584-01.
AIX specific commands.
STRMQTRC / ENDMQTRC / DSPMQTRC - start / stop / display MQ trace.
strmqtrc [-t TraceType] [-x TraceType] [-l MaxSize] [-d MaxUserDataSize]
Trace files ubication. During the installation process, you can choose the drive on which trace files are to be located. The trace files are always placed in the directory \<mqmwork>\errors (mq v 5.3) or \<mqmwork>\trace (mq v 6), where <mqmwork> is the directory selected when MQ was installed to hold MQ data files. Trace-file names have the following format: AMQppppp.TRC
System Administration Guide SC34-6068-02, page 228 [252/567]
UNIX special feature :
Start trace for all MQ operations
occurring on a system
by issuing the following command:
To format all trace files in the current directory use the following command:
Windows :
MQ for Windows trace does not require any formatting. Browse *.TRC files in "c:\MQ\trace\" directory.
Dumping the contents of the log using the dmpmqlog command
Use the dmpmqlog command to dump the contents of the queue manager log. By default all active log records are dumped, that is, the command starts dumping from the head of the log (usually the start of the last completed checkpoint). The log can usually be dumped only when the queue manager is not running. Because the queue manager takes a checkpoint during shutdown, the active portion of the log usually contains a small number of log records. However, you can use the dmpmqlog command to dump more log records using one of the following options to change the start position of the dump:
Administrar SERVICIOS de MQ ...
Compte amb els canvis (listener) amb la versió 6
Starting a queue manager service with amqmdain is not the same as using strmqm from the command line, because the MQ service executes in a non-interactive session, running under a different user account.
System Admin v 6.0, page 297 [319/647]
| Tool / file name | Purpose |
|---|---|
| amqsaicq.c | Create a local queue using the MQ Administration Interface (MQAI) |
| amqsaiem.c | Event monitor using the MQ Admin Interface (MQAI) |
| amqsailq.c | Inquire the current depth of all local queues using MQAI |
| amqsaxe0.c | ApiExit which traces MQAPI calls |
| amqsbcg0.c | Browse messages, text and header (use amqsgbr for text only) |
| amqsblst.c | Bandwidth and connectivity tester |
| amqscnxc.c | Client connection information on MQCONNX |
| amqsecha.c | Echo messages to reply to queue (triggered program) (sent by amqsreq, maybe) - see QM_resolution_sample or AMQSECH_modificat |
| amqsgbr0.c | Browse messages, text only (use amqsbcg for text and header) |
| amqsget0.c | Get a message |
| amqsgrma.c | Get reference messages from a queue. Checks that the objects, identified in the messages, exist |
| amqsinqa.c | MQINQ sample (triggered program) - inquiry Queue Depth, Get Inhibited and Input Count. |
| amqsldpc.c | Look up the MQ host name, channel name and queue name in an LDAP directory + MQPUT |
| amqsmon0.c | Get an statistics or accounting message |
| amqsprma.c | Create a reference message |
| amqsptl0.c | Put messages to a list of queues |
| amqsput0.c | Put a message |
| amqsqrma.c | Channel message exit program to process reference messages |
| amqsreq0.c | Put request messages to a queue, and show the reply message (sent by amqsecha, maybe) |
| amqsseta.c | MQSET sample (triggered program) |
| amqsspin.c | SSPI Channel Exit routines (Security) |
| amqsstop.c | Inquire on all the connections for a selected process and request them to be stopped |
| amqstrg0.c | Trigger monitor - read an initiation queue, and start the program associated with trigger message |
| amqstxgx.c | Get transaction for Tuxedo |
| amqstxpx.c | Put transaction for Tuxedo |
| amqstxsx.c | Server for Tuxedo |
| amqsvfc0.c | Skeleton of a Data Conversion exit |
| amqswlm0.c | CLWL exit that chooses a destination QMgr |
| amqsxae0.c | Sample Encina program |
| amqsxrma.c | Channel message exit to process reference messages |
| amquregn.c | Dump MQ values from Registry (NT) |
| amqzscgn.c | CICS Global User Exit (GLUE) program for the CICS Task termination user exit (UE014015) |
| amqzscin.c | XA switch program for CICS XA Initialisation |
MQ
|
.--- channel initiator [SYSTEM.CHANNEL.INITQ] (1) runmqchi (1)
|
.--- command server [SYSTEM.ADMIN.COMMAND.QUEUE] (2) dspmqcsv (2)
|
.--- trigger monitor [SYSTEM.DEFAULT.INITIATION.QUEUE] (3) runmqtrm(c)
|
.--- queue manager ------.
| |
| .--- queue
| | |
| | .--- local QL
| | .--- remote QR
| | .--- transmit QX
| | .--- alias QA
| | .--- model QM
| | .--- dynamic QD
| | .--- cluster QC
| | |
| | .
| |
| .--- message channels (uni-directional)
| | |
| | .--- sender SDR
| | .--- receiver RCVR
| | .--- server SVR
| | .--- requester RQSTR
| | .--- cluster sender CLUSSDR
| | .--- cluster receiver CLUSRCVR
| | |
| | .
| |
| .--- MQI channel (bi-directional)
| | |
| | .--- server-connection SVRCONN
| | .--- client-connection CLNTCONN
| | |
| | .
| |
| .--- process
| | |
| | .
| |
| .--- listener runmqlsr
| | |
| | .
(1)
dis qstatus(SYSTEM.CHANNEL.INITQ) type(handle) all => runmqchi
Remote queue
Use DEFINE QREMOTE to define a new local definition of a remote queue, a queue manager alias, or a reply-to queue alias, and to set its parameters. Page 178, MQ v 6.0, "MQSC Command Reference", SC34-6597-00 The remote queue definition supplies the name of the destination queue, the destination queue manager, and optionally, a transmission queue. "Using LDAP with WebSphere MQ", page 374, Application Programing Guide, MQ v 6.0, SC34-6595-01. If an application opens the local definition of a remote queue, RQMNAME must not be blank or the name of the local queue manager. When the open occurs, if XMITQ is blank there must be a local queue of this name, which is to be used as the transmission queue. Page 196, MQ v 6.0, "MQSC Command Reference", SC34-6597-00 When you use remote queue definitions to specify a transmission queue, your applications must not specify the location (that is, the destination queue manager) themselves. If they do, the queue manager will not make use of the remote queue definitions. Remote queue definitions make the location of queues and the transmission queue transparent to applications. Applications can put messages to a logical queue without knowing where the queue is located and you can alter the physical queue without having to change your applications. Page 27/525196, MQ v 7, "Intercommunication", SC34-6931-00 Model and dynamic queues
A model queue is a template of a queue definition used only when you want to create a dynamic local queue. You can create a local queue dynamically from a MQ program, naming the model queue you wish to use as the template for the queue attributes. You may now, if you wish, change some attributes of the new queue. However, you cannot change the DefinitionType (see bellow). MQ 5.3, "Application Programming Guide", SC34-6064-02, page 38 [60/643] MQopen() + ObjDesc : If the ObjectName field in the ObjDesc parameter is the name of a model queue, a dynamic local queue is created with the attributes of the model queue. MQ v 6.0, Application Programming Reference, SC34-6596-00, page 385 [409/665]
DEFTYPE : queue definition type
DEFTYPE := PERMDYN : a permanent dynamic queue is created.
DEFTYPE := TEMPDYN : a temporary dynamic queue is created.
DefinitionType (MQLONG) - This indicates how the queue was defined. MQQDT_PREDEFINED
The queue is a permanent queue created by the system administrator; only the system administrator can delete it.
Predefined queues are created using the DEFINE MQSC command, and can be deleted only by using the DELETE MQSC command.
Predefined queues cannot be created from model queues.
MQQDT_PERMANENT_DYNAMIC
The queue is a permanent queue that was created by an application issuing an MQOPEN call
with the name of a model queue specified in the object descriptor MQOD.
The model queue definition had the value MQQDT_PERMANENT_DYNAMIC for the DefinitionType attribute.
This type of queue can be deleted using the MQCLOSE call.
The value of the QSGDisp attribute for a permanent dynamic queue is MQQSGD_Q_MGR.
MQQDT_TEMPORARY_DYNAMIC
The queue is a temporary queue that was created by an application issuing an MQOPEN call
with the name of a model queue specified in the object descriptor MQOD.
The model queue definition had the value MQQDT_TEMPORARY_DYNAMIC for the DefinitionType attribute.
This type of queue is deleted automatically by the MQCLOSE call when it is closed by the application that created it.
The value of the QSGDisp attribute for a temporary dynamic queue is MQQSGD_Q_MGR.
Page 445, MQ v 6.0, "MQSC Command Reference", SC34-6597-00 MQClose() and diverse objects
MQ v 6.0, Application Programming Reference, SC34-6596-00, page 334 [359/665] Queue name resolution
Queue name resolution occurs at every queue manager each time a queue is opened. Its purpose is to identify the target queue, the target queue manager (which may be local), and the route to that queue manager (which may be null). The resolved name has three parts: the queue manager name, the queue name, and, if the queue manager is remote, the transmission queue. When a remote queue definition exists, no alias definitions are referenced. The queue name supplied by the application is resolved to the name of the destination queue, the remote queue manager, and the transmission queue specified in the remote queue definition. If there is no remote queue definition and a queue manager name is specified, or resolved by the name service, the queue manager looks to see if there is a queue manager alias definition that matches the supplied queue manager name. If there is, the information in it is used to resolve the queue manager name to the name of the destination queue manager. The queue manager alias definition can also be used to determine the transmission queue to the destination queue manager. MQ v 7 Intercommunication [34/525]
You do not need to provide a remote queue definition to enable the replies to be returned to QM1.
The message descriptor of the message retrieved from local queue PAYROLL
contains both the reply-to queue and the reply-to queue manager names.
Therefore, as long as QM2 can resolve the reply-to queue manager name
to that of a transmission queue on queue manager QM2, the reply message can be sent.
In this example, the reply-to queue manager name is QM1
and so queue manager QM2 simply requires a transmission queue of the same name.
MQ v 7 Intercommunication [290/525] Queue name resolution is vital to DQM. The sequence of events is as follows:
Chapter 7, MQ v 7 Intercommunication [499/525]
Name resolution
MQ v6.0 Application Programming Guide, page 113/601. .---. .---. .---. .---.
|qm1|-->| 2 |-->| 3 |-->|qm4|
.---. .---. .---. .---.
Posar a QM1 un missatge amb destinacio QL4 a QM4.
A QM1 cal una cua anomenada QM4 que apunti a QM2.
A QM2 cal una cua anomenada QM4 que apunti a QM3.
A QM3 cal una cua anomenada QM4 que apunti a QM4.
T400:\\MQ\Eines\QM_resolution_sample :
QMM1(1481) QMM2(1482)
.-------------. .-------------.
| | | |
| QL1 | | |
AMQSECH.exe | | QMM1.QMM2 | |
| TxQ=QMM2 | ---------------> | QLD |
| | | |
.-------------. .-------------.
1) llençar RU.CMD, que incorpora AMQSECH amb parametre QL1 de QMM1 - compte amb el procés RSP
2) amb RFHUTIL posar a la cua QL1 un missatge amb ReplyToQueue = QLD i ReplyToQueueManager = QMM2
3) el missatge "resposta" apareix a la cua QLD del gestor QMM2, sense definició de QREMOTE a QMM1.
|
||||||||||||||||||||||||||||||
When a queue manager receives a message, it looks in the transmission header to see the name of the destination queue and queue manager. If it has a queue-manager alias definition with the same name as the queue manager referenced, it substitutes the RQMNAME from its definition for the queue manager name in the transmission header. Clustering, page 40. Types of ALIAS
There are three types of alias :
These apply in a clustered environment just as well as in a distributed-queuing environment. Queue-manager aliases
The concept of queue-manager aliasing is described in detail in the "MQ Intercommunication book", SC34-6587. Queue-manager aliases, which are created using a remote-queue definition with a blank RNAME, have four uses:
Reply-to queue aliases
A reply-to queue alias definition is used to specify alternative names for reply information. Queue aliases
A QALIAS definition is used to create an ALIAS by which a queue is to be known. You might do this if, for example, you want to start using a different queue but you do not want to change your applications. You might also do this if for some reason you do not want your applications to know the real name of the queue to which they are putting messages, or because you have a naming convention that differs from the one where the queue is defined. Another reason might be security; your applications might not be authorized to access the queue by its real name but only by its alias.
MQ v 6.0, "Queue Manager Clusters", page 42 to 44 [60/201]. Few intersting things about Alias queues :
Attributes for queues
|
Main purpose : workload balancing.
Distributed queing is when you group queue managers in a cluster : the queue managers can make the queues that they host available to every other queue manager in the cluster. Any queue manager can send a message to any other queue manager in the same cluster without explicit channel definitions, remote-queue definitions, or transmission queues for each destination. Every queue manager in a cluster has a single transmission queue from which it can transmit messages to any other queue manager in the cluster. Each queue manager in a cluster needs to define only:
As with distributed queuing, an application uses the MQPUT() call to put a
message on a cluster queue at any queue manager.
An application uses the MQGET() call to retrieve messages
from a cluster queue on the local queue manager.
Each queue manager has a definition for the receiving end of a channel called TO.qmgr on which it can receive messages. This is a cluster-receiver channel. A cluster-receiver channel is similar to a receiver channel used in distributed queuing, but in addition to carrying messages this channel can also carry information about the cluster. Each queue manager also has a definition for the sending end of a channel, which connects to the cluster-receiver channel of one of the Full Repository (FR) queue managers. This is a cluster-sender channel. A cluster-sender channel is similar to a sender channel used in distributed queuing, but in addition to carrying messages this channel can also carry information about the cluster. Once both the cluster-receiver end and the cluster-sender end of a channel have been defined, the channel starts automatically. In any cluster you need to nominate two queue managers to hold full repositories. The clusters use the publish/subscribe model for internal messaging (and will Subscribe to only 2 FR)
Queue Manager Repository
is kept in
SYSTEM.CLUSTER.REPOSITORY.QUEUE queue
Few Q&A ;
Good intro : Getting started with queue manager clusters. Good article : cluster design and operation Interesting summary
#1 Regardless of how many FRs you have, each FR should have a manual CLUSSNDR defined to every other FR. #2 If every FR has a CLUSSNDR to every other FR, each FR will know about every cluster attribute on every QM in the cluster. #3 A PR will only ever publish info to 2 FRs. A PR will only ever subscribe to 2 FRs. Period. It doesn't matter how many manual CLUSSNDRs you define on that PR. A PR will only ever send its info (publish) to 2 FRs and will only get updates (subscribe) from 2 FRs. #4 You should only define one CLUSSNDR to one FR from a PR. #5 If 2 FRs go down in your cluster, your cluster will be able to send messages just fine. But any changes to cluster definitions become a problem. Any PRs that used both of these down FRs will still function for messaging, but they will not be made aware of any changes in the cluster because both of it's FRs are N/A. #6 If two of your FRs are down, and you still have other FRs, you could go to your PRs and delete the CLUSSNDR to the down FR, define a CLUSSNDR to an available FR and issue REFRESH CLUSTER(*) REPOS(YES). This would cause your PR to register with an available FR and thus pick up cluster changes. #7 In a properly designed system the liklihood of 2 FRs being down is next to zero, so the need for more than 2 FRs is next to zero. And even if both FRs are down it doesn't mean your cluster will come to a screeching halt. Just use 2 FRs. Problem : stuck message(s) @ Xmit Q(s)! What data do I need to join a cluster ?
DEFINE CHANNEL ('TO.QM1') +
CHLTYPE(CLUSRCVR) +
TRPTYPE(TCP) +
CLUSTER('OURCLUSTER') + [1]
DEFINE CHANNEL ('TO.QM2') + [3]
CHLTYPE(CLUSSDR) +
TRPTYPE(TCP) +
CLUSTER('OURCLUSTER') + [1]
CONNAME('remotehost(1482)') + [2]
Real sample : *** Se crea el canal CLUSTER RCVR ***
def channel(TO.QM01) +
chltype(CLUSRCVR) +
trptype(TCP) +
conname('mq.mio.es(1414)') +
cluster(CLS01) + [1]
maxmsgl(104857600) +
replace
*** Se crea el canal CLUSTER SDR ***
def channel(TO.QM02) + [3]
chltype(CLUSSDR) +
trptype(TCP) +
conname('mq.mio.es(1415)') + [2]
cluster(CLS01) + [1]
maxmsgl(104857600) +
replace
Pero para recibir información de la configuración del cluster, - las colas que hay ofrecidas / visibles al cluster - solo nos hace falta [1], el nombre del cluster ! Clustering demo
1 - producte as is 2 - facilitat incorporacio cues noves - no cal QREMOTE. 3 - as MQ 4 - sols 2 canals (+ cues que ofereix) 5 - 200 msg/segon, de 1KB a la VM del T42. 6 - sense coeficients o amb coeficients - CLWLWGHT/CLWLPRTY/CLWLRANK. 7 - caiguda de QM o cua no disponible(Put) 8 - QALIAS at entry node Sample cluster : 2xFR, 1 GW, 1 external qmgr
echo "DEFINE QLOCAL(INVENTQ) CLUSTER(INVENTORY) DEFBIND(NOTFIXED)" | runmqsc TQM4
echo "DEFINE QLOCAL(INVENTQ) CLUSTER(INVENTORY) DEFBIND(NOTFIXED)" | runmqsc TQM2
echo "DEFINE QREMOTE(ANY.INVENTQ) RNAME(' ') RQMNAME(' ')" | runmqsc TQM1
echo "ALTER QREMOTE(INVENTQ) RNAME(INVENTQ) RQMNAME(ANY.INVENTQ) XMITQ(TQM1)" | runmqsc TQM3
You have to be able to deduce that QM2 and 4 are the FR's, QM1 is the gateway, and QM3 is external to the cluster ... Display CLUSQMGR shows SYSTEM.TEMP.*
This is temporary type of situation in that this temporary name goes away once the repositories are brought in sync with each other. This is documented in MQ Queue Managers Clusters manual. Minimum actions - Create a Cluster
LO qm ALTER QMGR REPOS(INVENTORY)
NY qm ALTER QMGR REPOS(INVENTORY)
LO qm DEFINE CHANNEL(TO.LONDON) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME(LONDON.CHSTORE.COM) CLUSTER(INVENTORY)
NY qm DEFINE CHANNEL(TO.NEWYORK) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME(NEWYORK.CHSTORE.COM) CLUSTER(INVENTORY)
LO qm DEFINE CHANNEL(TO.NEWYORK) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME(NEWYORK.CHSTORE.COM) CLUSTER(INVENTORY)
NY qm DEFINE CHANNEL(TO.LONDON) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME(LONDON.CHSTORE.COM) CLUSTER(INVENTORY)
NY qm DEFINE QLOCAL(INVENTQ) CLUSTER(INVENTORY)
Add a QM (Paris) to the Cluster.
PA qm DEFINE CHANNEL(TO.PARIS) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME(PARIS.CHSTORE.COM) CLUSTER(INVENTORY)
PA qm DEFINE CHANNEL(TO.LONDON) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME(LONDON.CHSTORE.COM) CLUSTER(INVENTORY)
Add a QM+Q (Toronto + INVENTQ) to the Cluster.
TO qm DEFINE CHANNEL(TO.TORONTO) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME(TORONTO.CHSTORE.COM) CLUSTER(INVENTORY)
TO qm DEFINE CHANNEL(TO.NEWYORK) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME(NEWYORK.CHSTORE.COM) CLUSTER(INVENTORY)
TO qm DEFINE QLOCAL(INVENTQ) CLUSTER(INVENTORY)
Verify
NY qm DIS CLUSQ(*) CLUSTER (INVENTORY)
NY qm DIS CLUSQMGR(*) CLUSTER (INVENTORY)
TO qm DIS CLUSQ(*) CLUSTER (INVENTORY)
TO qm DIS CLUSQMGR(*) CLUSTER (INVENTORY)
Load Balance ( LA gets twice as many messages as NY )
LA qm DEFINE CHANNEL(TO.LA) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME(LA.CHSTORE.COM) CLUSTER(INVENTORY) CLWLWGHT(2)
NY qm ALTER CHANNEL(TO.NEWYORK) CHLTYPE(CLUSRCVR) CLWLWGHT(1)
Minimum actions - Display the Cluster
dis clusqmgr(*)
Minimum actions - Delete a Cluster
You don't, as such. A Cluster isn't an "entity" that can be deleted.
MQ Server access to a Cluster queue
SET MQSERVER=QMS3.SVRCONN/tcp/localhost(1423)
DEFINE QALIAS(QSAGCLU) TARGQ(QSEBAS)
amqsputc QSAGCLU
Cluster troubleshooting
Available commands are :
Chapter 6, "Queue Manager Clusters", SC34-6589-00. (one of the) Full Repository QM fails. When back, it does not see the remote cluster queues. Sol : SUSPEND qmgr + RESUME qmgr
Com saber qui es/son el "Full Repository" de un cluster ?
Use the DISPLAY CLUSQMGR command to display cluster information about queue managers in a cluster. If you issue this command from a queue manager with a full repository, the information returned pertains to every queue manager in the cluster. If you issue this command from a queue manager that does not have a full repository, the information returned pertains only to the queue managers in which it has an interest. That is, every queue manager to which it has tried to send a message and every queue manager that holds a full repository. Use the SUSPEND QMGR command and RESUME QMGR command to remove a queue manager from a cluster temporarily, for example for maintenance, and then to reinstate it. In an emergency where a queue manager is temporarily damaged, you might want to inform the rest of the cluster before the other queue managers try to send it messages. RESET CLUSTER can be used to remove the damaged queue manager. Later when the damaged queue manager is working again, you can use the REFRESH CLUSTER command to reverse the effect of RESET CLUSTER and put it back in the cluster again. Use the DISPLAY QCLUSTER(*) command to display all queues visible from a given cluster queue manager. The DISPLAY QUEUE or DISPLAY QCLUSTER command returns the name of the queue manager that hosts the queue (or the names of all queue managers if there is more than one instance of the queue). It also returns the system name for each queue manager that hosts the queue, the queue type represented, and the date and time at which the definition became available to the local queue manager. Cluster symptoms and solutions :
"Queue Manager Clusters", SC34-6589-00, csqzah07.pdf, apendix A. 2189 MQRC CLUSTER RESOLUTION ERROR
The queue is being opened for the first time and the queue manager cannot make contact with any full repositories. Make sure that the CLUSSDR channels to the full repositories are not in retry state. 1 : display clusqmgr(*) qmtype status
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM1) CLUSTER(DEMO)
CHANNEL(TO.QM1) QMTYPE(NORMAL)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM2) CLUSTER(DEMO)
CHANNEL(TO.QM2) QMTYPE(REPOS)
STATUS(RUNNING)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM3) CLUSTER(DEMO)
CHANNEL(TO.QM3) QMTYPE(REPOS)
STATUS(RUNNING)
Qmgr (new) values not updated in Cluster
If a queue manager has some values (as listener port) at the moment the cluster is created, a change in those values shall not be propagated to the Cluster (repository), unless the following procedure is used :
Repeat with QM2, the other FR.
Com es fa per convertir un FR en PR ???
alter qmgr repos(' ')
Com es fa per convertir un PR en FR ??? alter qmgr repos('mycluster')
Problems with clustering when changing IP
url.
Clustering hints and tips
url.
Heartbeat and Keep Alive
When you are defining cluster-sender channels and cluster-receiver channels choose a value for HBINT or KAINT that will detect a network or queue manager failure in a useful amount of time but not burden the network with too many heartbeat or keep alive flows. MQ v 5.3, "Clustering", SC34-6061-02, page 79 [95/183] On platforms other than z/OS, if you need the functionality provided by the KAINT parameter, - Keep Alive -, use the Heartbeat Interval (HBINT) parameter, MQ v 6.0, "MQSC Reference", SC34-6597-00, page 130 [150/501] What about my applications?
You need not alter any of your applications if you are going to set up a simple MQ cluster. The applications name the target queue on the MQOPEN(queue_name) call as usual and need not be concerned about the location of the queue manager [MQCONNECT(qmgr_name)]
Using clusters for workload management
+
More than one instance of a queue
Clustering, SC34-6061-02, page 63/183 You can organize your cluster such that the queue managers in it are clones of each other, able to run the same applications and have local definitions of the same queues. The advantages of using clusters in this way are:
Any one of the queue managers that hosts an instance of a particular queue can handle messages destined for that queue. This means that applications need not explicitly name the queue manager when sending messages. A workload management algorithm determines which queue manager should handle the message. Workload balancing
When you have clusters containing more than one instance of the same queue, MQ uses a workload management algorithm to determine the best queue manager to route a message to. The workload management algorithm selects the local queue manager as the destination whenever possible. If there is no instance of the queue on the local queue manager, the algorithm determines which destinations are suitable. Suitability is based on the state of the channel (including any priority you might have assigned to the channel), and also the availability of the queue manager and queue. The algorithm uses a round-robin approach to finalize its choice between the suitable queue managers. If an application opens a target queue so that it can write messages to it, the MQOPEN call chooses between all available instances of the queue. Any local version of the queue is chosen in preference to other instances. This might limit the ability of your applications to exploit clustering. If it is not appropriate to modify your applications to remove message affinities, there are a number of other possible solutions to the problem. For example, you can
Clustering, SC34-6061-02, page 65 to 70/183
The cluster workload management algorithm
If a local queue within the cluster becomes unavailable while a message is in transit, the message is forwarded to another instance of the queue but only if the queue was opened (MQOPEN) with the MQOO_BIND_NOT_FIXED open option, of the MQ_Open() specified "MQOO_BIND_AS_Q_DEF" and DEFBIND queue param value is NOTFIXED. MQ 6.0 Queue Manager Clusters, csqzah07.pdf, SC34-6589-00, page 51 To route all messages put to a queue using MQPUT to the same queue manager by the same route, use the MQOO_BIND_ON_OPEN option on the MQOPEN call. To specify that a destination is to be selected at MQPUT time, that is, on a message-by-message basis, use the MQOO_BIND_NOT_FIXED option on the MQOPEN call. MQ 6.0 Programming Guide, page 96 [116/601] The workload management algorithm selects the local queue manager as the destination whenever possible. from MQ 5.3 Clustering, SC34-6061-02, page 49
On v6 you can change the workload balancing algorithm
so that it does not use a preffered-local strategy.
On v5.x, you can use a cluster workload exit, or you can use a different queue manager for your PUTS than you do for your GETS, and this other qmgr would be in the cluster but not have a qlocal X.
CLWLUSEQ := ANY ; { Local, Any, Queue Manager }
MQ v6 "MQSC" SC34-6587-00, pg 50 [70/501] Client access to a cluster
...
.. [ server_1 ]
[ client ] <---> . [ gw ]
.. [ server_2 ]
...
Com codificar Let's make it run ! Straight WLB
Let's use Alias
If TQM3 has an alias queue WLMAQ, whose TARGETQ is WLMQ1, the WLG.EXE can write to it, and the messages still get to (split) queues. External access (fail)
If another (external to the cluster) qm TQM4 writes into RMQ99, a remote queue pointing to queue WLMAQ and manager TQM3, the messages go into TQM3DLQ, TQM3's Dead Letter Queue, with Reason d'2082 = MQRC_UNKNOWN_ALIAS_BASE_Q in Dead-Letter Header, because the message carries the destination Queue Manager field ... and there is no such queue there ! Solution : in the Gateway queue manager (TQM3), set a queue manager alias See PUT ! Tested on what virtual machine ? MB !!! |
Queue managers themselves need to exist only on the computer on which you create them. In the event of failover, the MSCS initiates the queue managers on the other computer. The queue managers, however, must have their log and data files on a cluster shared disk, and not on a local drive.
System Admin Guide, chapter 13 - Supporting MSCS
Dead Letter Queue must exist if you dont want to have problems with the channels. If a message arrives at a queue manager but there is no queue there to receive it, the message is put on the dead-letter queue as usual. If there is no dead-letter queue, the channel fails and retries, as described in the MQ Intercommunication book. "Clustering", v 5.3, SC34-6061-02, page 8. Again : For example, if an application tries to put a message on a queue on another queue manager, but gives the wrong queue name, the channel is stopped and the message remains on the transmission queue. Other applications cannot then use this channel for their messages. System Administration Guide, v 5.3, SC34-6068-02, page 26. Again : If you do not, and the MCA is unable to put a message, it is left on the transmission queue and the channel is stopped. Intercommunication, v 5.3, SC34-6059-02, page 13. Again : If all the retries are unsuccessful, the message is written to the dead-letter queue. If there is no dead-letter queue available, the channel stops. MQ v6 Intercommunication, SC34-6587, page 429 [451/573]. You can create it by using the DEADQ attribute on the ALTER QMGR command to specify one later. DLQ monitor : MS71 ! How to WRITE into DLQ
Method #1 : Define a remote queue pointing to an existing queue manager, but refering to a non-existing remote queue. Method #2 : put a message into a XMIT queue, and get RC = d'0271 = MQFB_XMIT_Q_MSG_ERROR Method #3 : Define a cluster of 3 queue managers : TQM1, TQM2 and TQM3. How to READ from it
DLQ definition
DEFINE QLOCAL ('DLQ') +
DESCR('Dead Letter Queue.') +
PUT(ENABLED) +
GET(ENABLED) +
DEFPRTY(0) +
DEFPSIST(YES) +
SCOPE(QMGR) +
MAXDEPTH(5000) + // 999.999.999
MAXMSGL(104857600) + // 4194304
REPLACE
alter qmgr DEADQ('DLQ')
DLQ structure (from CMQC.H)
typedef struct tagMQDLH MQDLH ;
typedef MQDLH MQPOINTER PMQDLH ;
struct tagMQDLH {
MQCHAR4 StrucId ; /* Structure identifier */
MQLONG Version ; /* Structure version number */
MQLONG Reason ; /* Reason message arrived on dead-letter (undelivered-message) queue */
MQCHAR48 DestQName ; /* Name of original destination queue */
MQCHAR48 DestQMgrName ; /* Name of original destination queue manager */
MQLONG Encoding ; /* Numeric encoding of data that follows MQDLH */
MQLONG CodedCharSetId ; /* Character set identifier of data that follows MQDLH */
MQCHAR8 Format ; /* Format name of data that follows MQDLH */
MQLONG PutApplType ; /* Type of application that put message on dead-letter (undelivered-message) queue */
MQCHAR28 PutApplName ; /* Name of application that put message on dead-letter (undelivered-message) queue */
MQCHAR8 PutDate ; /* Date when message was put on dead-letter (undelivered-message) queue */
MQCHAR8 PutTime ; /* Time when message was put on the dead-letter (undelivered-message) queue */
};
El camp Reason ens diu el motiu per el que s'ha posat el missatge a la DLQ. Ha de ser del tipus MQFB_* o bé MQRC_* : mirar cmqc.h
En podriem fer una llista ?
Que fem si el MB posa un msg a la DLQ amb Dead Letter Header amb Reason = MQFB_APPL_FIRST ? Mirar Event Log per problemes de Broker ! DLQ handler
MQ v 6.0 System Admin Guide, chapter 12 : the MQ DLQ handler Hubert : if you want to move all messages, specify a rule file (let's say rules.dlq) which contains the following lines inputqm(' ') inputq(' ')
wait (no)
action(fwd) fwdq(Q1) header(no)
Then run the following command (Unix sample) runmqdlq < rules.dlq
|
||
Sending messages to a distribution list
|
MQRFH2
Is where JMS properties are held. Message format MQRFH2 should be used to read and write JMS messages. The MQRFH2 header is used to pass messages to and from a message broker belonging to WebSphere Message Broker. In a message, the MQRFH2 header follows the MQ message descriptor (MQMD) and precedes the message body, if present. Publish/subscribe, page 66 [74/114] The MQRFH2 header contains information about the structure of a message, and its intended consumers, to enable a message broker to process the message and deliver or publish the message to those consumers. The value 'MQRFH2 ' should be put in the Format field of the preceding header (usually the MQMD). Publish/subscribe, page 67 [75/114] struct tagMQRFH2 {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQLONG StrucLength; /* Total length of MQRFH2 including all NameValueLength and NameValueData fields */
MQLONG Encoding; /* Numeric encoding of data that follows last NameValueData field */
MQLONG CodedCharSetId; /* Character set identifier of data that follows last NameValueData field */
MQCHAR8 Format; /* Format name of data that follows last NameValueData field */
MQLONG Flags; /* Flags */
MQLONG NameValueCCSID; /* Character set identifier of NameValueData */
};
The following two fields are optional, but if present they must occur as a pair. They can be repeated as a pair as many times as required. NameValueLength This field specifies the length, in bytes, of the NameValueData field that follows this field.
NameValueData This is a variable-length character string containing data that is encoded using an XML-like structure.
Sample : 00000 52 46 48 20 02 00 00 00--24 00 00 00 22 02 00 00 |RFH ....$..."...|
00010 B5 01 00 00 4D 51 53 54--52 20 20 20 00 00 00 00 |¹...MQSTR ....|
00020 B8 04 00 00 31 32 33 34-- |»...1234 |
00000 52 46 48 20 02 00 00 00--98 00 00 00 22 02 00 00 |RFH ........"...|
00010 B5 01 00 00 4D 51 53 54--52 20 20 20 00 00 00 00 |¹...MQSTR ....|
00020 B8 04 00 00 20 00 00 00--3C 6D 63 64 3E 3C 4D 73 |»... ...<mcd><Ms|
00030 64 3E 6A 6D 73 5F 74 65--78 74 3C 2F 4D 73 64 3E |d>jms_text</Msd>|
00040 3C 2F 6D 63 64 3E 20 20--2C 00 00 00 3C 6A 6D 73 |</mcd> ,...<jms|
00050 3E 3C 75 6E 6F 3E 76 75--6E 6F 3C 2F 75 6E 6F 3E |><uno>vuno</uno>|
00060 3C 64 6F 73 3E 76 64 6F--73 3C 2F 64 6F 73 3E 3C |<dos>vdos</dos><|
00070 2F 6A 6D 73 3E 20 20 20--1C 00 00 00 3C 75 73 72 |/jms> <...<usr|
00080 3E 3C 75 70 31 3E 75 70--31 76 61 6C 3C 2F 75 70 |><up1>up1val</up|
00090 31 3E 3C 2F 75 73 72 3E--62 6F 64 79 62 6F 64 79 |1></usr>bodybody|
0x01B5 = 437. 0x04B8 = 1208. ****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 437
Format : 'MQHRF2 '
Priority : 0 Persistence : 0
MsgId : X'414D5120514D5820202020202020202049F830F420003B02'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'QMX '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'16010515000000AA0C49B28692DB65B26D507AF401000000000000000000000B'
ApplIdentityData : ' '
** Origin Context
PutApplType : '11'
PutApplName : 'C:\sebas\Eines\rfhutilc.exe'
PutDate : '20090504' PutTime : '11153824'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 78 bytes
00000000: 5246 4820 0200 0000 4400 0000 2202 0000 'RFH ....D..."...'
00000010: B501 0000 4D51 5246 4832 2020 0000 0000 'µ...MQRFH2 ....'
00000020: B804 0000 0C00 0000 3C6D 6364 3E3C 2F6D '¸.......<mcd></m'
00000030: 6364 3E20 0C00 0000 3C6A 6D73 3E3C 2F6A 'cd> ....<jms></j'
00000040: 6D73 3E20 3132 3334 3536 3738 3930 'ms> 1234567890 '
Message service folders
The following folder names are defined for use by WebSphere MQ products:
Each folder is contained in a separate NameValueData field, each of which is preceded by a NameValueLength field. Publish/subscribe, page 70 [78/114] How to write a msg with RFH2 :
| ||
|
Header scanner tool
Let's build a program that
A MQ message consists of control information and application data.
MQ v7 App Prog Guide, 34/615. You can recognize the WebSphere MQ headers by looking at the successive Format names, starting with the MQMD and continuing through any headers present. The following Format names indicate these WebSphere MQ headers:
The MQ message structure is : |
Putting from a queue manager outside a cluster
Let us consider how the queue manager QM3, that is outside the cluster, can put a message to the queue Q2 at QM2, which is inside the cluster, thru QM1 that is inside the cluster and acts as a Gateway. The queue manager outside the cluster, QM3, must have a QREMOTE definition for each queue in the cluster that it wants to put messages to. For example: DEFINE QREMOTE(Q2) RNAME(Q2) RQMNAME(QM2) XMITQ(QM1)
Because QM3 is not part of a cluster, it must communicate using distributed queuing techniques. Therefore, it must also have a sender channel and a transmission queue to QM1. When an application at QM3 issues an MQPUT call to put a message to Q2, the QREMOTE definition causes the message to be routed through the gateway queue manager QM1. Putting from a queue manager outside the cluster - alternative
There is another way of putting from a queue manager outside a cluster. On the gateway queue manager define a queue-manager alias called, for example, ANY.CLUSTER: DEFINE QREMOTE(ANY.CLUSTER) RNAME(' ') RQMNAME(' ')
This maps any response to the queue manager ANY.CLUSTER to null, which means the QREMOTE definition in the queue manager outside the cluster can use the queue manager name ANY.CLUSTER instead of having to use the exact queue manager name. Therefore, on the queue manager outside the cluster, the definition: DEFINE QREMOTE(Q2) RNAME(Q2) RQMNAME(ANY.CLUSTER) XMITQ(QM1)
would cause messages to go to QM1 initially, and from there to be routed to any queue manager in the cluster that hosts the cluster queue Q2. MQ v 5.3, Clustering, SC34-6061-02, page 42 [58/183] Lets test it in a cluster environment |
MQ_GET()
El MQ_Get pot fer conversió de codis de caracters si
Compte amb el entorn z/OS vs Unicode ...
MQFMT_STRING
"Application Programming Reference", MQ v 6.0, SC34-6596-00, page 163 [187/665] If you include the MQGMO_CONVERT option in the GetMsgOpts parameter, the application message data is converted to the representation requested by the receiving application, before the data is placed in the Buffer parameter: The Format field in the control information in the message identifies the structure of the application data, and the CodedCharSetId and Encoding fields in the control information in the message specify its character-set identifier and encoding. The application issuing the MQGET call specifies in the CodedCharSetId and Encoding fields in the MsgDesc parameter the character-set identifier and encoding to which to convert the application message data. When conversion of the message data is necessary, the conversion is performed either by the queue manager itself or by a user-written exit, depending on the value of the Format field in the control information in the message. "Application Programming Reference", MQ v 6.0, SC34-6596-00, page 368 [392/665] ccsid.tbl
"System Admin Guide", MQ v 6.0, SC34-6584-01, page 79 [101/647] 852 1208
1236 1208
437 1208
Channel
Application data conversion
When you move messages between systems, you sometimes need to convert the application data into the character set and encoding required by the receiving system. This can be done either from within application programs on the receiving system or by the MCAs on the sending system. "Application Programming Guide", MQ v 6.0, page 140 [160/601] However, if the final destination is a platform that does not support data conversion on the MQGET, you must specify CONVERT(YES) on the sender channel that sends the data to its final destination."Application Programming Guide", MQ v 6.0, page 149 [169/601] MCA max speed = 35 M Bytes / sec = 280 M bits / sec ; What if we have 1 GB LAN o 100 GB ?
|
If we want to know the received (still enqueued) message length (to allocate the exact amount of memory) before effectively receiving it ....
"Application Programming Reference", MQ v 5.3, SC34-6062-02, page 377 [403/781] |
To know the name of the Default Queue Manager ...
If I set queue manager name to "" or null when connecting, I get a connection to whatever is set as default manager. Once I connected: is there a way to find what manager I am connected to? Use amqscnxc.c !
Start runmqsc - it is displayed on first line !
(only if it is in "Running" state ...)
Hint : it is required for remote admin |
Listening on
SYSTEM.ADMIN.COMMAND.QUEUE
for PCF messages,
there's a Command Server.
PCF and Admin Interface, SC34-6598-00, page 35/725. Command Server. The MQ component that reads commands from the system-command input queue, verifies them, and passes valid commands to the command processor. MQ 5.3 Bibliography and Glossary, SC34-6113-02, page 26 Commands to manage it are STRMQCSV / ENDMQCSV / DSPMQCSV. Under normal circumstances, the Display command shows : MQ Comand Server Status ... : Running
The process doing so is AMQPCSEA.EXE
One per Node ?
Commands :
|
||
A namelist is a MQ object
that contains a list of other MQ objects.
Typically, namelists are used by applications
such as trigger monitors,
where they are used to identify a group of queues.
The advantage of using a namelist
is that it is maintained independently of applications;
that is, it can be updated
without stopping any of the applications that use it.
Also, if one application fails,
the namelist is not affected and other applications can continue using it.
iSeries System Administration Guide WebSphere MQ for iSeries Version 6.0 SC34-6586-00 A namelist is a MQ object that contains a list of cluster names, queue names or AUTHINFO object names. In a cluster, it can be used to identify a list of clusters for which the queue manager holds the repositories. Programs can use the MQI to find out which queues are included in these namelists. The organization of the namelists is the responsibility of the application designer and system administrator. "Application Programming Guide" WebSphere MQ 5.3 SC34-6064-02, page 44 [66/643] Overlapping clusters : "Queue Manager Clusters" WebSphere MQ 6.0, SC34-6598-00, page 105 [123/201] A namelist is used to define a list of names that all apply to an object. For example, to specify that a qmgr belongs to more than one cluster add the cluster names to a namelist and put the namelist in the CLUSNL attribute of the qmgr. The only thing you can do to a namelist is open it to do an MQINQ call to get a list of all the names on there. |
BackOut count & Max - they go on a msg or on a queue ?
Can the backout queue be Remote ? Alias ? No : you can code it, but get an error on run time : can not move the message to the backout queue.
Como provocar un BackOut ?
backout.c !
MD.BackoutCount (MQLONG)
QLOCAL.BOTHRESH & QLOCAL.BOQNAME
See
To help handle units of work, MQ provides the BackoutCount attribute. This is incremented each time a message, within a unit of work, is backed out. If the message repeatedly causes the unit of work to abend, the value of the BackoutCount finally exceeds that of the BackoutThreshold. This value is set when the queue is defined. In this situation, the application can choose to remove the message from the unit of work and put it onto another queue, as defined in BackoutRequeueQName. MQ v 5.3, "Application Programming Guide" SC34-6064-02, page 176 [198/643]. The BOTHRESH and BOQNAME are used by your application so that it can move a message that has been backed out BOTHRESH times to another queue. Not having the BOQNAME shouldn't have any effect on this. A well-behaved application will check the backout count on every message read, and if it is non-zero, compare it to the backout threshold defined on the queue. If the count is greater than the threshold, the message should be written to the queue specified in the BOQNAME parameter and committed. Often a Dead Letter Header (MQDLH) is attached to the message to indicate why the message was written to the backout queue. Recommendations
From here |
A channel is a communication link used by distributed queue managers. MCA max speed = 35 MB/sec.
There are two categories of channel in MQ:
There are two types of MQI channel : server-connection and client-connection.
MQ 6.0, "Application Programming Guide", SC34-6595-01, page 45 [65/601]
The definition of each end of a message channel can be one of the following types:
Do not confuse message channels with MQI channels. There are two types of MQI channel : server-connection and client-connection.
A message channel is defined using one of these types defined at one end, and a compatible type at the other end. Possible combinations are:
MQ v 6.0, "Intercommunication", SC34-6587, page 8 [30/573].
Supose we have this environment, where firewall prevents QM2 to start a normal Sender-Receiver channel from QM2.TO.QM1, but not TCP connections from QM1 to QM2.
We shall use a SERVER channel at QM2 and a REQUESTER channel at QM1. In this way, the data can flow from QM2 to QM1, and the channel is started from QM1.
A server connection channel object defines the name of a channel that a client can use to connect to a queue manager and the attributes of the MCA that hosts that connection.
This is different to all other channel types, because it is never used by the queue manager itself. Instead, an entry is added to a client channel definition table (CCDT) file, which can be distributed to other machines and used by client applications to configure their MCAs.
A channel can be caused to start transmitting messages in one of four ways. It can be:
In Windows systems, start a listener as a background process at the receiver end of each channel.
Then start the channels, again as background processes:
System Administration, page 63 [87 of 567]
If you want the first message put in the queue DESA4 to start the associated transmit channel DESA3.DESA4, then define the queue this way :
The TrigData attribute
must contain the name of the channel to be triggered.
The InitQ must be exactly SYSTEM.CHANNEL.INITQ
Application Programming, page 197 [219 of 643]
Transmission queue definition (for channel "QM2.QM1")
When the first message is put on this transmission queue, a trigger message is sent to the initiation queue, SYSTEM.CHANNEL.INITQ. The channel initiator gets the message from the initiation queue and starts the channel identified in the trigger data (QM2.TO.QM1). The channel initiator can only get trigger messages from SYSTEM.CHANNEL.INITQ so you should not use any other queue as the initiation queue.
Intercommunication, page 424 [448 of 815]
|
Message context
1 - Identity context
2 - Origin context
Application Programming, page 32 [55 of 643] |
Try using message segmentation. That will allow MQ to split the message up into segments (allowing a file bigger than the max message length to be successfully transmitted). Make sure that the program receiving the file either reads the segments (using MQGMO_LOGICAL_ORDER) and reassembles the file itself, or ask MQ to do it (using MQGMO_COMPLETE_MSG). Segmentation sample, both JMS and J2EE.
Increase max msg size at :
MQ & DCOM
|
MQ counters use Windows Management Instrumentation ... ... that are displayed thru ASP pages ... .. that require PWS = Personal Web Server (W98) / IIS (W2K & WXP) See [T42:\{isb}\mqmon.asp] !
Com saber quants missatges han passat per un canal ?
Per una cua ?
event monitor - get code from "E
|
In MQ the parameter is "EXPIRY"
and it is located in MQMD,
the Message Descriptor used on every MQPUT().
See page 148 of "SC34-6062-02", Application Programming Reference for MQ version 5.3 If a message does expire, does it go to DLQ or is it removed from MQ without a trace ? Detail Expired messages - Messages that have expired are discarded by the next appropriate MQGET call. However, if no such call occurs, the expired messages are not discarded, and, for some queues, particularly those where message retrieval is done by MessageId, CorrelId, or GroupId and the queue is indexed for performance, a large number of expired messages can accumulate. The queue manager can periodically scan any queue for expired messages, which are then deleted. MQ v 6.0 for z/OS, Concepts and Planning Guide, GC34-6582-00, page 45, 61/207
mq.net :
mq.net :
|
CreateCompleteQmgr.bat
By Emir
- Simple (with LISTENER)
rem @echo off
if .%1. == .. goto ajuda
@echo Aturar el QManager (%1)
amqmdain end %1
@echo Esborrar el QManager (%1)
dltmqm %1
@echo Creacio QManager (LC = Log Circular, LF = Log File size * 4KB)
crtmqm -lc -lf 2560 -u %1.dlq DEFPSIST(YES) %3 %4 %5 %1
@echo Creacio listener ; v 6.0 "Listener creation no longer supported"
amqmdain crtlsr %1 -t tcp -p %2
@echo Engegar Manager i serveis associats
amqmdain start %1
pause
@echo Creacio listener v 6.0
@echo define listener(nom) trptype(TCP) port(%2) control(QMGR) replace | runmqsc %1
@echo Crear dead letter queue
@echo def ql(%1.dlq) replace | runmqsc %1
@echo Crear Xmit queue
@echo def ql(OFACQM) usage(XMITQ) replace | runmqsc %1
@echo Crear Rcv queue
@echo def ql(PRIME_IN_QUEUE) replace | runmqsc %1
@echo Crear Remote queue
@echo def qr(GLOBUS_IN_QUEUE) rname(GLOBUS_IN_QUEUE) rqmname(OFACQM) \
xmitq(OFACQM) replace | runmqsc %1
@echo Crear Sender channel
@echo define channel(CH_NAME) chltype(SDR) trptype(TCP) \
XMITQ(XQN) conname('<ip>(<port>)') replace | runmqsc %1
@echo Crear Requester/Receiver channel
@echo define channel(SUN_TO_NT) chltype(RQSTR) trptype(TCP) \
conname('172.30.12.137(1416)') replace | runmqsc %1
goto final
:ajuda
echo Primer parametre = nom de QManager
echo Segon parametre = numero de Port
:final
|
||||||||||
* Dead Letter Queue must always be present.
DEFINE QLOCAL(DLQ) +
DEFPSIST(YES) +
MAXDEPTH(5000) +
MAXMSGL(104857600) +
replace
* Listener sample : starts and stops with queue manager.
DEFINE LISTENER ('mq_listener') +
TRPTYPE(TCP) +
PORT(1415) +
CONTROL(QMGR) +
REPLACE
START LISTENER ('mq_listener')
* Define channel for Remote Admin.
DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
DEFINE QMODEL ('SYSTEM.MQEXPLORER.REPLY.MODEL')
* Alter System Objects for 100 MB messages.
ALTER QLOCAL('SYSTEM.DEFAULT.LOCAL.QUEUE') MAXMSGL(104857600)
ALTER CHANNEL ('SYSTEM.DEF.RECEIVER') CHLTYPE(RCVR) MAXMSGL(104857600)
ALTER CHANNEL ('SYSTEM.DEF.SENDER') CHLTYPE(SDR) MAXMSGL(104857600)
* Alter System Object for Client Access rights.
ALTER CHANNEL ('SYSTEM.DEF.SVRCONN') +
CHLTYPE(SVRCONN) +
MCAUSER('mqm')
Special commands
|
||||||||||
It is very useful to have this configuration : DEFINE CHANNEL ('TOSERVER') CHLTYPE(SVRCONN) +
MCAUSER('Administrator') +
REPLACE
DEFINE CHANNEL ('TOSERVER') CHLTYPE(CLNTCONN) +
CONNAME('192.168.1.150(1414)') +
QMNAME('MQSERVER') +
REPLACE
Advantatges ? Unless you set the AMQCHLTAB and AMQCHLLIB variables and export the channel table file to the client-based machine, CLNTCONN will not be used. |
AMQMTRBN .
amqhasmn.exe - the logger.
amqmsrvn.exe - COM server.
amqmtbrn.exe - .
amqpcsea.exe - the command server.
amqrmppa.exe - channel process.
amqrrmfa.exe - repository process (for clusters).
amqsvc.exe - .
amqxssvn.exe - shared memory server(s).
amqzdmaa.exe - deferred message processor.
amqzfuma.exe - OAM process.
amqzlaa0.exe - queue manager agents (LQM agents).
amqzllp0.exe - checkpoint processor.
amqzxma0.exe - processing controller.
runmqchi.exe - channel initiator.
runmqlsr.exe - listener.
Description of MQ tasks :
Job name Function
AMQALMPX The checkpoint processor that periodically takes journal checkpoints.
AMQCLMAA Non-threaded TCP/IP listener.
AMQCRSTA TCP/IP-invoked channel responder.
AMQCRS6B LU62 receiver channel and client connection (see note).
AMQFCXBA Broker worker job.
AMQPCSEA PCF command processor. Handles PCF and remote administration requests.
AMQRMPPA Channel process pooling job.
AMQRRMFA Repository manager for clusters.
AMQZDMAA Deferred message handler.
AMQZFUMA Object authority manager (OAM).
AMQZLAA0 Queue manager agents that perform the bulk of the work for applications
that connect to the queue manager using MQCNO_STANDARD_BINDING.
AMQZLAS0 Queue manager agent.
AMQZXMA0 The execution controller is the first job started by the queue manager.
Deals with MQCONN requests.
Starts agent processes to process MQ API calls.
AMQZMGR0 Process controller. Used to start up and manage listeners and services.
AMQZMUC0 Utility manager. Do critical utilities, as the journal chain manager.
AMQZMUR0 Utility manager. Do critical utilities, as the journal chain manager.
RUNMQBRK Broker control job.
RUNMQCHI The channel initiator.
RUNMQCHL Sender channel job that is started for each sender channel.
RUNMQDLQ Dead letter queue handler.
RUNMQLSR Threaded TCP/IP listener.
RUNMQTRM Trigger monitor.
"Description of MQ tasks", iSeries : System Admin Guide, url End the processes in the following order: amqzmuc0 Critical process manager
amqzxma0 Execution controller
amqzfuma OAM process
amqzlaa0 LQM agents
amqzlsa0 LQM agents
amqzmur0 Restartable process manager
amqrmppa Process pooling process
amqrrmfa The repository process (for clusters)
amqzdmaa Deferred message processor
amqpcsea The command server
"Stopping queue managers", System Admin Guide, SC34-6068-01, appendix D page 485 [507/560] would like to understand the function of the amqzlsa0 process
The amqzlsa0 process is the local queue manager (LQM) socket agent main program. It handles socket connections to the queue manager when the application to queue manager connection is set to isolated bindings. If DefaultBindType is set to ISOLATED, then applications and the queue manager run in separate processes, and no resources are shared between them. The amqzlsa0 process will not be running throughout the life of the queue manager. Once isolated bindings are enabled, then amqzlsa0 is called to initialize the resources that are necessary to support isolated bindings, and the WebSphere® MQ processes interacts as usual. |
wrkmqmchl (work with Channels, OS/400 Main Menu)
5 = Visualizar (Refresh)
14 = Iniciar (Start)
15 = Finalizar (Stop)
wrkmqm - treballar amb un Queue Manager.
18 = trabajar con colas.
12 = trabajar con mensajes.
8 = visualizar datos.
wrklnk - accés al sistema de fitxers.
Ubicació de les trasses : (*** llegir amb EDTF ***)
/Root/QIBM/UserData/mqm/errors
o
/Root/QIBM/UserData/mqm/qmgrs/QMANAGER.AS400/errors
runmqsc - fer servir MQ Scripts
Channel problems :
Use the wrklnk command and then option 5 to display the error logs.
Generally for any "channel" issues this (the error logs) is the best place to start.
Migrating to MQ v7 on i 6.1
Have to do "object conversion" using STROBJCVN LIB(QMQM). Thanks to J.A.Flores {01042011} ! |
||
[root@dmqb261]:/tmp/soft/mqjexplorer> cat mqj.sh
export CLASSPATH=./export.jar
export CLASSPATH=$CLASSPATH:./jhbasic.jar
export CLASSPATH=$CLASSPATH:./com.ibm.mq.jar
export CLASSPATH=$CLASSPATH:./jta.jar
export CLASSPATH=$CLASSPATH:./com.ibm.mq.pcf.jar
export CLASSPATH=$CLASSPATH:./xerces.jar
export CLASSPATH=$CLASSPATH:./mqjhelp.jar
export CLASSPATH=$CLASSPATH:./com.ibm.mqjms.jar
export CLASSPATH=$CLASSPATH:./jms.jar
export CLASSPATH=$CLASSPATH:./jndi.jar
export CLASSPATH=$CLASSPATH:./ldap.jar
export CLASSPATH=$CLASSPATH:./fscontext.jar
export CLASSPATH=$CLASSPATH:./providerutil.jar:
echo Ara mateix el CLASSPATH es .....
echo $CLASSPATH
java -verbose:class com.kolban.mqjexplorer.MQJExplorer
[root@dmqb261]:/tmp/soft/mqjexplorer>
14062006 : Exception in thread "main"
java.lang.UnsatisfiedLinkError:
Can't find library mqjbnd02 (libmqjbnd02.a or .so) in sun.boot.library.path
or java.library.path
sun.boot.library.path=/usr/java14/jre/bin
Santi : llibreria JMS !
Problemes al AIX ? Permisos ! (98 %)
Resta : Filesystem [/MQHA/qmgrname/log]
|
|
You can run two MQ queue managers on the same machine by making sure they both use a unique port. Here are the definitions and how you can do this on a Windows system. 1. Create two queue managers and start them :
crtmqm QMGR1 crtmqm QMGR2 strmqm QMGR1 strmqm QMGR2 2. Use the RUNMQSC utility against QMGR1 (runmqsc QMGR1) :
def channel(QMGR1.TO.QMGR2) chltype(SDR) +
trptype(tcp) conname('hostname(1415)') +
xmitq(QMGR2) +
replace descr('QMGR1 to QMGR2 sender')
def channel(QMGR2.TO.QMGR1) chltype(rcvr) +
trptype(tcp) replace
def qlocal(QMGR2) like(SYSTEM.DEFAULT.LOCAL.QUEUE) +
replace share usage(xmitq)
def qremote('TO.QMGR2') +
like(SYSTEM.DEFAULT.REMOTE.QUEUE) xmitq(QMGR2) +
replace rname('FROM.QMGR1') rqmname(QMGR2)
def qlocal('FROM.QMGR2') replace
end
3. Use the RUNMQSC utility against QMGR2 (runmqsc QMGR2) :
def channel(QMGR2.TO.QMGR1) chltype(SDR) +
trptype(tcp) conname(hostname) xmitq(QMGR1) +
replace descr('QMGR2 to QMGR1 sender')
def channel(QMGR1.TO.QMGR2) chltype(rcvr) +
trptype(tcp) replace
def qlocal(QMGR1) like(SYSTEM.DEFAULT.LOCAL.QUEUE) +
replace share usage(xmitq)
def qremote('TO.QMGR1') +
like(SYSTEM.DEFAULT.REMOTE.QUEUE) xmitq(QMGR1) +
replace rname('FROM.QMGR2') rqmname(QMGR1)
def qlocal('FROM.QMGR1'
end
4. Start the channels and listeners for the two queue managers :
runmqlsr -t tcp -m QMGR1 -p 1414 runmqlsr -t tcp -m QMGR2 -p 1415 runmqchl -c QMGR1.TO.QMGR2 runmqchl -c QMGR2.TO.QMGR1 At this point, you can send messages from QMGR1 to QMGR2 using the MQ sample programs:
e:\mqm\tools\samples\c\bin\amqsput TO.QMGR2 QMGR1 Message to QMGR2 *blank ends program. *send a message to QMGR1 from QMGR2. e:\mqm\tools\samples\c\bin\amqsput TO.QMGR1 QMGR2 Message to QMGR1 *blank ends program. *get the message on QMGR1 sent by QMGR2. e:\mqm\tools\samples\c\bin\amqsget FROM.QMGR2 QMGR1 Message to QMGR1 no more messages program ends *get the message on QMGR2 sent by QMGR1. e:\mqm\tools\samples\c\bin\amqsget from.QMGR1 QMGR2 Message to QMGR2 no more messages program ends Queue Loop [Tania]
If we write into a Remote Queue RQ1, that points to RQ2, that is a Remote Queue again, that points to DQ2, Destination Queue. The environment needs TQ1 and TQ2 (transmission queues) and 2 channels. So, a message put into RQ1 comes auto-magically into DQ2. QM1 QM2
RQ1 TQ1=QM2 ch.QM1.to.QM2 RQ2
DQ2 ch.QM2.to.QM1 TQ2=QM1
Well, if DQ2 is NOT a Local Queue, but an Alias queue, pointing to RQ1, we have a nice loop. With just one (two) message(s), we shall have all resources approaching max capacity, so we can measure how many messages can a queue manager, a queue or a channel be able to manage. Request / Response loop (plus aditives)
If we write using AMQSREQ.exe into a Alias Queue QA1, that points to Remote Queue QR1, that will use Transmit Queue QX1, the message shall go thru channel ch.QM1.to.QM2 and finish at QL2. At QM2, the message will be answered by AMQSECHA.exe program, going to QL1. QM1 (veci) | QM2 (hesp)
|
AMQSREQ.exe |
| |
QA1 -> QR1 -> QX1=QM2 -> ch.QM1.to.QM2 -> QL2
|
| AMQSECHA.exe
| |
QL1 <- ch.QM2.to.QM1 <- QX2=QM1 <- QR2 <- QA2
|
What can we add ?
If messages are timestamped and Reply has original Message_Id in the Correl_Id field, we can measure the go-and-back time, scanning QC1 or QC2 contents. |
A "channel" is the mechanism that one queue manager uses to pass messages
to another queue manager.
Application considerations involved with MQ, GG24-4469, page 65 [87/250], "14.4 - MCA Exits". Consideracions per llenguatges i per plataformes : Using and writing API exits, chapter 15, MQ v 6.0 Application Programming Guide From MQSC Command Reference :
Security exits normally work in pairs; one at each end of a channel. They are called immediately after the initial data negotiation has completed on channel startup, but before any messages start to flow. The primary purpose of the security exit is to enable the MCA at each end of a channel to authenticate its partner. However, there is nothing to prevent a security exit from performing other function, even function that has nothing to do with security. Security exits can communicate with each other by sending security messages. The format of a security message is not defined and is determined by the user. One possible outcome of the exchange of security messages is that one of the security exits might decide not to proceed any further. In that case, the channel is closed and messages do not flow. If there is a security exit at only one end of a channel, the exit is still called and can elect whether to continue or to close the channel. Security exits can be called on both message and MQI channels. The name of a security exit is specified as a parameter in the channel definition at each end of a channel.
(5.3) "Security.pdf" (pg 52) User exits
User exits provide a mechanism for you to insert your own code into a queue manager function. The user exits supported include:
(5.3) "Extending Queue Manager facilities", System Administration Guide, SC34-6068-02, page 12 [36/567]. How to write an User-Exit
User exits and channel-exit programs are able to make use of all MQI calls, except as noted in the sections that follow. To get the connection handle, an MQCONN must be issued, even though a warning, MQRC_ALREADY_CONNECTED, is returned because the channel itself is connected to the queue manager. You are recommended to avoid issuing the following MQI calls in channel-exit programs:
Channel-exit programs should not modify the Channel Data structure (MQCD). Cluster workload exits must not use MQI calls. All exits are called with a channel exit parameter structure (MQCXP), a channel definition structure (MQCD), a prepared data buffer, data length parameter, and buffer length parameter. The buffer length must not be exceeded. (5.3) "Writing and compiling channel-exit programs", Intercommunication, SC34-6059-02, page 633 [657/815]. The exit is a DLL that must be written in C. The exit name is the name of a dynamic-link library, suffixed with the name of a function residing in that library. The function name must be enclosed in parentheses. The library name can optionally be prefixed with a directory path and drive: [d:][path]library(function) The name is limited to a maximum of 128 characters. "MQCD - Channel definition", (6.0) Intercommunication, SC34-6587, page 453 [475/573]. When writing channel exits for these products using Visual C++, you should do the following:
Intercommunication, v 5.3, SC34-6059-02, page 641. MQ Series Distributed Queuing Guide, SC33-1139-06, pg 274. Message Exit params
void MQENTRY MQAExit (
PMQVOID mqcxpptr, /* Channel exit parameter block MQCXP in/out */
PMQVOID mqcdptr, /* Channel definition MQCD in/out */
PMQLONG inmsglngptr, /* Length of data in/out */
PMQLONG inbuflngptr, /* Length of agent buffer in */
PMQVOID inbufptr, /* Agent buffer MQXQH+data in/out */
PMQLONG outmsglngptr, /* Length of exit buffer in/out */
PMQPTR outbufptr ) /* Address of exit buffer in/out */
{
A amqsxrma.c la definició és : void MQENTRY MsgExit
( PMQCXP pExitParms,
PMQCD pChannelDef,
PMQLONG pDataLength,
PMQLONG pAgentBufferLength,
PMQCHAR pAgentBuffer,
PMQLONG pExitBufferLength,
PMQCHAR * pExitBuffer
) ;
AgentBuffer (MQBYTE x AgentBufferLength) - input/output
The contents of this depend upon the exit type:
My 2 user exits
How to compile a user exit
Guindous : CL /MD /GD /V"SAG v 1.3" /LD /I"C:\MQ\Tools\c\include" GNX2.C
"c:\MQ\Tools\Lib\mqm.lib"
"c:\MQ\Tools\Lib\mqmvx.lib"
-DEFAULTLIB myexit.def
Unix : mqm@lope:/home/mqm/eines/bin> cat comp.sh
#!/usr/bin/ksh
FNO=$1
NFC=$FNO".c"
FNcli=$FNO"c"
echo "Anem a compilar" $NFC
echo "Sortida " $FNO
cc -L/usr/mqm/lib -lmqm -o $FNO ../$NFC
cc -L/usr/mqm/lib -lmqic -o $FNcli ../$NFC
echo "Fi."
Solaris : (SPARC platform 32 bit applications) gcc ?
cc -xarch=v8plus -KPIC -mt -G -o /var/mqm/exits/amqsaxe \
amqsaxe0.c -I/opt/mqm/inc -L/opt/mqm/lib -R/opt/mqm/lib \
-R/usr/lib/32 -lmqm -lmqmcs -lmqmzse -lmqmzf -lsocket -lnsl -ldl
Page 205, Application Programing Guide, MQ v 6.0, SC34-6595-01. Under W2K, the Message Exit DLL has to be placed in d:\IBM\WebSphere MQ\exits ! Declaración al MQ Explorer
Propiedades de "canal" + Rutinas de Salida :
Nombre rutina salida mensaje := my_dll(My_Exit)
or (old way, RUNMQSC)
MSGEXIT('MY_DLL(My_Exit)')
El canal Q1TOQ2 del QMgr Q1 té : Security Exit Name := MSGMON(MsgExit)
Security Exit Data := c:\temp\channel.ini
Message Exit Name := MY_DLL(My_Exit)
El canal Q2TOQ1 del QMgr Q2 té : Message Exit Name := MSGMON(MsgExit)
Message Exit Data := c:\temp\channel.ini
My Exit's at AIX
Posar el font a /home/sebas/exits.
Ha de tenir un parametre de entrada : ubicació del fitxer de sortida
Adaptar la compilació :
Moure la DLL ('EXES.O' o 'GNX2.O')
a destinació : al Solaris, les Exits es posen a
/var/mqm/exits/
Crear el fitxer de sortida (compte amb el propietari) : MVQTRXIT.TRC o GNX2.TRC
Incloure les sentencies de la Exit al canal
MSGEXIT('EXES(MQAExit)')
MSGDATA('c:\MVQTRXIT.TRC)') o MSGDATA('/home/exits/trace/MVQTRXIT.TRC')
Re-iniciar el queue manager ( o n'hi ha prou amb el canal ? )
API Exit's
See the MQ Application Programming Guide. Es molt interessant la MirrorQ exit - duplica missatges ! Sequència de instalació (win) :
* Create the Namelist to show the source and target queues.
* This case sensitive name must match the name specified in the Data= field
DEFINE NAMELIST('mirrorq') REPLACE +
DESCR('Namelist to define source and target queues for MIRRORQ') +
NAMES(TEST_IN1,TEST_IN1_COPY,'INDI',TEST_IN2,TEST_IN2_COPY,'INDI')
Que fa ? Tot missatge que es posa a la cua TEST_IN1 resulta duplicat a la cua TEST_IN1_COPY. Unix : Configuring API exits on UNIX® systems. ApiExitLocal:
Name=mirrorq
Sequence=3
Function=EntryPoint
Module=/var/mqm/exits64/mirrorq
Data=mirrorq
An invalid magic number for a module implies that there is a 32-bit to 64-bit missmatch. cc -L/usr/mqm/lib64 -lmqm -o OBJECTFILE SOURCEFILE
Per generar el module (es la "dll" de AIX), es a dir, per compilar una Exit : mqm@lope:/home/mqm/eines/api_exit > ./x2
echo "Compilar normal, 32 bits."
xlc -q32 -e MQStart -bE:mirrorq.exp -bM:SRE -o mirrorq mirrorq.c \
-I/usr/mqm/inc -L/usr/mqm/lib -lmqm -lmqmzf
echo "Compilar recursiu, 32 bits."
xlc_r -q32 -e MQStart -bE:mirrorq.exp -bM:SRE -o mirrorq_r mirrorq.c \
-I/usr/mqm/inc -L/usr/mqm/lib -lmqm_r -lmqmzf_r
echo "Copiar a destinacio :"
cp mirrorq /var/mqm/exits
cp mirrorq_r /var/mqm/exits
echo "Compilar normal, 64 bits :"
xlc -q64 -e MQStart -bE:mirrorq.exp -bM:SRE -o mirrorq mirrorq.c \
-I/usr/mqm/inc -L/usr/mqm/lib64 -lmqm -lmqmzf
echo "Compilar recursiu, 64 bits :"
xlc_r -q64 -e MQStart -bE:mirrorq.exp -bM:SRE -o mirrorq_r mirrorq.c \
-I/usr/mqm/inc -L/usr/mqm/lib64 -lmqm_r -lmqmzf_r
echo "Copiar a destinacio :"
cp mirrorq /var/mqm/exits64
cp mirrorq_r /var/mqm/exits64
Si us dona l'error "ld: 0711-317 ERROR: Undefined symbol: .MQXEP", es que no heu afegit "-lmqmzf" ! Compte que a la URL també hi ha un mirrorq.cpp que fa el mateix, però per Triggering !
* Bussiness consumer source queue
DEFINE QLOCAL('MIRRORQ.BUSINESSQ') REPLACE +
DESCR('Exit queue for MIRRORQ')
* mirror queue
DEFINE QLOCAL('MIRRORQ.MIRRORQ') REPLACE +
DESCR('Mirror queue for MIRRORQ')
* Bussiness producer destination queue
DEFINE QLOCAL('MIRRORQ.STAGEQ') REPLACE +
DESCR('Entry queue for MIRRORQ') +
SHARE +
TRIGGER +
TRIGTYPE (EVERY) +
INITQ('MIRRORQ.TRIGGER') +
PROCESS('MIRRORQ.PROCESS')
* Initiation Queue used by MIRRORQ
DEFINE QLOCAL('MIRRORQ.TRIGGER') REPLACE +
DESCR('Trigger queue')
* Process definition to load mirrorq.exe
DEFINE PROCESS('MIRRORQ.PROCESS') REPLACE +
DESCR('Trigger process for MIRRORQ') +
USERDATA('MIRRORQ.BUSINESSQ MIRRORQ.MIRRORQ') +
APPLICID('mirrorq')
Compte que a vegades cal que es conservi el MsgId ! |
IBM WebSphere Message Broker File Extender
is a set of plug-in nodes
designed to handle files
residing on the same file system
as the Message Broker run time.
WebSphere Message Broker File Extender
extends the capabilities of WebSphere Business Integration Message Broker
into the domain of files.
File Extender [jj] | ||
If you install MQ v5.3 undel SuSE or RedHat Linux, and get a "Segmentation Fault", fix it by export LD_ASSUME_KERNEL=2.4.19
MQ HA 5.3 installation under Linux [url] Gracias, Pablo ! |
||
If you use BCC32 instead of CL, then the MQM.LIB has not the proper format. To convert it to "Borland's" format, use COFF2OMF.exe, that can be found at "c:\Borland\BCC55\Bin" !
Error: 'C:\MQ\Tools\Lib\MQM.LIB' contains invalid OMF record, type 0x21 (possibly COFF)
|
System Admin Guide, SC34-6068-02, chapter 13 - Supporting MSCS |
Si, al instalar un FP de MQ, ens diu AMQ4757 error, "MQ files in use", hem de fer :
Specifies whether the message-channel-agent program
on an outbound MCA channel
should run as a thread or a process. {Jeff improved}
PROCESS - The message channel agent runs as a separate process
THREAD - The message channel agent runs as a separate thread
In situations where a threaded listener is required to service a large number of incoming requests, resources can become strained. In this case, you should use multiple listener processes and target incoming requests at specific listeners though the port number specified on the listener.
MQSC Command Reference, SC34-6598-00, page 135 [155/501]
Channel type : Sender (SDR), Receiver (RCVR), Server (SVR), Requester (RQSTR), Cluster-Sender (CLUSSDR), Cluster-Receiver (CLUSRCVR).
Have to choose :
On the Sender channel MCA,
define the MCATYPE as Thread, instead of Process,
as performance is better.
Read "Running channels as processes or threads", page 168, (5.3) Intercommunication.
When running a multi-threaded process such as the agent process,
you might reach the soft limit for file descriptors.
This gives you the WebSphere MQ reason code
MQRC_UNEXPECTED_ERROR (2195) and,
if there are enough file descriptors, a MQ FFST file.
To avoid this problem,
you can increase the process limit for the number of file descriptors.
To do this, alter the nofiles attribute
in /etc/security/limits to 10,000
for the mqm user id or in the default stanza.
MQ v 6.0 for AIX quick beginnings, page 5 [19/72], GC34-6478-01.
When you put a message on a queue, you can select to receive:
If you want to receive a report message, specify the name of your reply-to queue in the ReplyToQ field; otherwise the MQPUT or MQPUT1 of your original message fails with MQRC_MISSING_REPLY_TO_Q.
Application Programming Guide, SC34-6595-01, page 22, [42/601]
This indicates whether the message survives system failures and restarts of the queue manager.
Message persistence
MQ 6.0 Programming Guide, pg 30 [50/601], SC34-6595-01 This means that the message survives system failures and restarts of the queue manager. Once the message has been put, and the putter's unit of work committed (if the message is put as part of a unit of work), the message is preserved on auxiliary storage. It remains there until the message is removed from the queue, and the getter's unit of work committed (if the message is retrieved as part of a unit of work). MQ 5.3 Application Programming Guide, pg 171 [197/781], SC34-6062-02 Data for persistent messages is written to log buffers. These buffers are written to the log data sets when:
MQ z/OS Problem Determination Guide, GC34-6600-00 La persistencia de un missatge es determina :
When you create a message, if you initialize the message descriptor (MQMD) using the defaults, the persistence for the message is taken from the DefPersistence attribute of the queue specified in the MQOPEN command. Alternatively, you can set the persistence of the message using the Persistence field of the MQMD structure to define the message as persistent or nonpersistent. Persistence is really a message attribute and not a queue attribute. Si els missatges son no persistents, i el log creix 7 GB cada dia, com podem investigar el seu contingut ? Create a new qmgr, start it, create a queue, put a persistent message, end the qmgr, print the log. Why an external DB is required ?
Global units of work
Are those in which other resources,
such as tables in a relational database,
are also updated.
When more than one resource manager is involved,
there is a need for transaction manager software
that uses a two-phase commit process
to coordinate the global unit of work.
Use global units of work when you also need to include
updates to relational database manager software,
such as DB2, Oracle, and Sybase.
MQ 5.3 System Admin Guide - SC34-6068-02, chapter 11 : Transactional support. Using CICS with WebSphere MQ & setting up the TXSeries interface to WebSphere MQ : |
Circular logging
Linear logging
De que no ens protegeix el Log circular ?
Use CIRCULAR logging plus DATA and LOG (separate) disks in RAID (5 or 10)
Another EXCELENT T-Rob's article : Circular logging enables the queue manager to reconcile the status of any outstanding transactions on restart. Linear logging enables recovery from this and more drastic outages such as loss of the queue file. If that was all there was to it, the obvious choice would always be to use linear logs. Linear logging provides a superset of the functionality of circular logging. Queue manager restart operations using linear logs function the same as with circular logs: the log files are reconciled against the queue files to determine the disposition of transactional messages. In addition to the transactions under syncpoint, linear logs also contain a copy of all persistent messages. If one or more queue files are damaged, the queue can be recovered to the last known good state by replaying the linear logs. This is known as media recovery. Risks of circular logging :
Linear log maintenance : The basis of the system is SupportPac MS62, Linear Log Cleanup Utility, a Perl script that parses the error logs to identify the inactive extents and provides options to archive or delete them. El SaveQmgr ens porta cap a un "arranque en frio" ! With circular logging, you only get stop/restart capability for a "healthy" queue manager. MQ objects are not written to circular logs. To restart a queue manager if objects have been damaged or lost, you also need media recovery. In order to perform media recovery, the queue manager must have written media images of MQ objects in the logs. MQSeries stores media images in logs only if you are using linear logging. "Backup and Recovery" redbook, SG24-5222.pdf
Logged messages and other things logged are not removed from logs.
Logs are history.
Logs are required for queue manager restart to ensure consistency.
Non-persistent messages are not logged.
UofW information is logged.
GC34-6582-00, WebSphere MQ for z/OS Concepts and Planning Guide. Chapter 4, Logging. -------------------------------------------------------------------------------
11/07/08 14:50:49 - Process(10510.1) User(QMQM) Jobname(182465/QMQM/AMQALMPX )
AMQ7460: Información de diario de inicio de WebSphere MQ.
EXPLICACIÓN:
Causa . . . . . : WebSphere MQ emite periódicamente este mensaje para
ayudarle a identificar los receptores de diario que pueden eliminarse del
sistema porque ya no se necesitan para operaciones de recuperación en el
momento de iniciar.
Recuperación . : Ninguna.
Descripción técnica . . . . . . . . : La fecha de la entrada de diario más
antigua necesaria para la recuperación en el momento de iniciar es 04/11/08
16:38:43. Esta entrada está dentro del receptor de diario AMQA000030.
WebSphere MQ no precisa de los receptores de diario anteriores para la
recuperación en el momento de iniciar. Si el nombre de el receptor de diario es
**********, WebSphere MQ no pudo determinar el nombre del receptor. El formato
de la serie de fecha es *DMY.
-------------------------------------------------------------------------------
11/07/08 14:50:49 - Process(10510.1) User(QMQM) Jobname(182465/QMQM/AMQALMPX )
AMQ7462: Información de diario de recuperación de soporte de almacenamiento WebSphere MQ.
EXPLICACIÓN:
Causa . . . . . : WebSphere MQ emite periódicamente este mensaje para
ayudarle a identificar qué receptores de diario pueden eliminarse del sistema,
puesto que ya no son necesarios para recuperar el soporte de almacenamiento.
Recuperación . : Ninguna.
Descripción técnica . . . . . . . . : La fecha más antigua de la entrada de
diario necesaria para recuperar el soporte de almacenamiento es 07/11/08
14:50:49. Esta entrada está en el receptor de diario AMQA000031. WebSphere MQ
no precisa de los receptores de diario anteriores para la recuperación desde el
medio de almacenamiento. Si el nombre de el receptor de diario es **********,
WebSphere MQ no pudo determinar el nombre del receptor. El formato de la serie
de fecha es *DMY.
-------------------------------------------------------------------------------
Log Size definition
LogFilePagesSize=number ("-lf=NN") The log data is held in a series of files called log files. The log file size is specified in units of 4 KB pages. In MQ for UNIX systems, the default number of log file pages is 1024, measured in units of 4 KB. giving a log file size of 4 MB. The minimum number of log file pages is 64 and the maximum is 65 535. In MQ for Windows, the default number of log file pages is 256, measured in units of 4 KB. giving a log file size of 1 MB. The minimum number of log file pages is 32 (128 KB) and the maximum is 65 535 (262 MB). Note: The size of the log files specified during queue manager creation cannot be changed for a queue manager. MQ v 6.0 System Administration Guide, SC34-6584-01, page 118 [140/647] HKLM\SOFTWARE\IBM\MQSeries\CurrentVersion\Configuration\QueueManager\<nom>\Log\LogPrimaryFiles\
Log size calculation
MQ v 6.0 System Administration Guide, SC34-6584-01, page 238 [260/647] If a large (500 KB) BAR file has to be deployed, the (Windows) default values are not enough If we have to store 5.000 messages of 500 KB each (2,5 GB), we shall use "-lp 10" ! Message filtering
{bestp}
My rough guidelines
Have 5 primary and 5 secondary
Definitely set LogFilePages (lf param) to 16384 (this is, 64 MB each file)
Use circular logging (in most cases)
Make sure the disk space will allow the use of the above log files
Make sure the queue space has enough space for a weeks worth of messages at least
Round up to nearest GB
Make sure the Dead Letter Queue is defined and has a very large max depth (eg 500000)
Make sure transmit queues have a large max depth (eg 50000)
Recovery and problem determination
In the case of a communications failure,
messages remain on queues until they are removed by a receiving application.
If the message is being transmitted,
it remains on the transmission queue
until it can be successfully transmitted.
To recover from a communications failure,
you can usually restart the channels using the link that failed.
Media recovery
MQSeries Backup and Recovery, SG24-5222 : online, pdf. Question : why do we get \\t400\C:\> rcdmqimg -m MYQMGR -t all *
AMQ7044: Recuperación de soporte magnético no permitida. AMQ7044 MEDIA RECOVERY NOT ALLOWED
Answer : the reason is that your queue manager uses circular logging instead of linear logging. |
First Aid Kit
Primeros auxilios. A continuación se presentan una serie de pasos a realizar cuando se encuentra algún problema con el MQ.
Troubleshooting exercices
|
Info to get
Plataforma ........................ ... AIX / HPUX / Wintel
Arquitectura ...................... ... 32 ó 64 bit, Wintel
Sistema Operatiu .................. ... uname -a/unix ver/windows
Tipus de producte ................. ... MQ Client / MQ Client con SSL / MQ (Server)
Versió MQ + CSD aplicat ........... ... dspmqver
Configuració ...................... ... standalone / cluster MQ / HACMP
Nom Queue Manager ................. ... dspmq
Adreça IP ......................... ... ping <ip>
Port Listener ..................... ... netstat -an <port>
Nom Dead Letter Queue ............. ... runmqsc + display qmgr all
Fondaria Dead Letter Queue ........ ... llegir capçaleres
Llegir LOGs general i especific ... ... AMQERR01.LOG
Noms cues i canals ................ ... SAVEQMGR
Exits configuration ............... ... qm.ini
Exits code ........................ ... /var/mqm/exits(64)/
Get ALL the info manually : DISPLAY QMGR ALL
DISPLAY QUEUE(*) ALL
DISPLAY CHANNEL(*) ALL
DISPLAY NAMELIST(*) ALL
DISPLAY PROCESS(*) ALL
DISPLAY AUTHINFO(*) ALL
DISPLAY CLUSQMGR(*) ALL
DISPLAY LISTENER(*) ALL
Items to verify
Some Tuning here ... |
Start a MQ trace :
On WebSphere MQ for AIX, WebSphere MQ for iSeries, WebSphere MQ for HP-UX, WebSphere MQ for Linux, WebSphere MQ for Solaris, and WebSphere MQ for Windows, the MaxMsgLength defaults to 100 MB (104 857 600 bytes). In WebSphere MQ for z/OS, the MaxMsgLength attribute of the queue manager is fixed at 100 MB and the MaxMsgLength attribute of the queue defaults to 4 MB (4 194 304 bytes) which you can change up to a maximum of 100 MB if required. However, the limit is 63 KB when using shared queues accessed by queue managers in a queue-sharing group. In MQSeries for AT&T GIS UNIX, MQSeries for Compaq OpenVMS Alpha, MQSeries for SINIX and DC/OSx, MQSeries for Compaq NonStop Kernel, and MQSeries for VSE/ESA the MaxMsgLength defaults to 4 MB. MQ v 5.3 Application Programming Guide, SC34-6064-02, page 19 [41/643] MQ v 6.0 Application Programming Guide, SC34-6595-01, page 19 [39/601] Items involved
If you want to pass such a big file in one message you need to set the max msg size on
Handling messages greater than 4 MB long
Messages can be too large for the application, queue, or queue manager.
Depending on the environment,
MQ provides a number of ways of dealing with messages
that are longer than 4 MB.
On all MQ V6 systems,
you can increase the MaxMsgLength attribute, up to 100 MB.
Set this value to reflect the size of the messages using the queue.
MQ v 6.0 Application Programming Guide, SC34-6595-01, page 129 [149/601] Segmentation of large messages
The maximum length of an individual message allowed in a MQ infrastructure is 100 MB. However, by default, queues do not accept messages larger than 4 MB.
Messages that are larger than 100 MB,
or larger than 4 MB where a queue that a message passes through
on route to its destination is not configured to accept messages
of a larger size,
can be broken into smaller segments.
MQ v 6.0 Fundamentals, 4.6.7, page 71 [95/446] Sender : ...
message.messageFlags = MQC.MQMF_SEGMENTATION_ALLOWED ;
queue.put ( message, pmo ) ;
...
Receiver : ...
MQGetMessageOptions gmo = new MQGetMessageOptions() ;
gmo.options = MQC.MQGMO_FAIL_IF_QUIESCING | MQC.MQGMO_COMPLETE_MSG | MQGMO_ALL_SEGMENTS_AVAILABLE ;
queueIN.get ( retrievemqmessage, gmo ) ;
...
Ver libro "MQ v 5.1_Planning Guide_GC33-1349-08.pdf" TRY IT ! Reference messages
This method allows a large object to be transferred from one node to another without storing the object on MQ queues at either the source or the destination nodes. This is of particular benefit when the data already exists in another form, for example, for mail applications. To do this, you specify a message exit at both ends of a channel. In the MQMD structure, set the Format field to MQFMT_REF_MSG_HEADER. MQ v 6.0 Application Programming Guide, SC34-6595-01, page 133 [153/601] PM4DATA
The PM4Data product from CommerceQuest is well suited for transporting large files using a WebSphere MQ backbone as a base transport. These files can exceed the WebSphere MQ message size limit of 100 MB because the data is spread into packets transported using separate messages. Splitting the data into discrete buffers can be configured using the product's administrative interface. Unlike standard FTP, the WebSphere MQ channels used by PM4Data provide all the advantages of guaranteed, assured delivery. PM4Data also supplies a range of graphical tools and methods for tracking the file movement. |
Platform coverage :
DEFINE LISTENER ('QMS1LSR') +
TRPTYPE(TCP) +
IPADDR(' ') +
PORT(1421) +
DESCR('Listener TCP del QM.') +
CONTROL(QMGR) + ; start/stop with qmgr. STARTONLY
REPLACE
Sources :
Trick : Otra cosa que hago con MQ es no usar las opciones de instalacion por defecto.
Uso "Advanced" y selecciono todo (Server, Client, SDK, ... ).
El Client, sobre todo, puede ser útil para mirar colas en servidores remotos.
V 6 books : [T42:\MQ\BOOKS\V6]
Title Order number
WebSphere MQ Application Programming Guide SC34-6595-01 * OK * csqzal11.pdf
WebSphere MQ Application Programming Reference SC34-6596-00 * OK * csqzak10.pdf
WebSphere MQ Bibliography and Glossary SC34-6603-00
WebSphere MQ Clients GC34-6590-01 * OK * csqzf09.pdf
WebSphere MQ Constants SC34-6607-00 * OK *
WebSphere MQ Intercommunication SC34-6587-00 * OK *
WebSphere MQ Messages GC34-6601-00
WebSphere MQ Migration Information SC34-6604-01 * OK * csqzao01.pdf
Monitoring WebSphere MQ SC34-6593-00 * OK * CSQZAX05
WebSphere MQ PCF and Administration Interface SC34-6598-00 * OK *
WebSphere MQ Publish/Subscribe User's Guide SC34-6606-00 * OK * amqnar10
WebSphere MQ Queue Managers Clusters SC34-6589-00 * OK *
WebSphere MQ Script (MQSC) Command Reference SC34-6597-00 * OK *
WebSphere MQ Security SC34-6588-01 * OK *
WebSphere MQ System Administration Guide SC34-6584-01 * OK *
WebSphere MQ Transport for SOAP SC34-6651-00 * OK * csqzau00
WebSphere MQ Using C++ SC34-6592-00
WebSphere MQ Using Java SC34-6591-01 * OK *
WebSphere MQ Using .Net GC34-6605-01
2 items to remotely administer z/OS MQ :
Canvi de versió / salvar dades
It would be advisable to compile and link your apps with the new libraries
Migration resources
WebSphere MQ Quick Beginnings Guides : WebSphere MQ Migration Information Manual - url Online Information Center for WebSphere MQ v6.0 - url SupportPac MS6A: WebSphere MQ V6.0 for UNIX Automatic Migration & Maintenance Installation - url Announcement: End of support for WebSphere MQ 5.3 - url End of Service dates for WebSphere MQ - url WebSphere MQ Detailed System Requirements - url WebSphere MQ Recommended Fixes - url Technotes :
DeveloperWorks Article related to Migration : "Migrating WebSphere MQ queue manager clusters to WebSphere MQ V6" - url Migration to MQ v6 on Distributed Platforms.pdf - url |
MQ v 5.3, "Messages", chapter 8, 'API completion and reason codes', page 111 [120/223] 2058 - You Can't Spell The Queue Manager Name Right
2059 - You Can't Get To That Queue Manager From Here
2085 - You Can't Spell The Queue Name Right
2035 - You Can't Do That (verbose)
2033 - This Queue Is Empty (Or Might As Well Be)
Client envir : 2009, 2018, 2019 2033, 2119, 2080, 2079, 2016, 2051, 2059, 2162 API CC's & RC's : on-line. |
See Intercommunication manual for suggested naming conventions
Best practices experts chat.
More best practices:
Few come from here - gracias, Francisco !
More best practices : shared queues and application programs.
Mind there are MB Best Practices also, and MQ @ HACMP Best Practices too.
The runmqlsr has a much smaller overhead of connecting to and disconnecting from the queue manager
because it only uses a single thread per connection rather than an entire process.
A inetd listener has a significantly smaller capacity because of the need to create a new process for every client.
Channels can be started by using the INETD or the RUNMQLSR listener.
INETD initiated channels use between 5 and 10 times more memory than RUNMQLSR channels.
MQ for AIX v6.0 - performance evaluations
You can now start and stop listeners and services using the START and STOP MQSC commands. However, the old commands strmqcsv, endmqcsv, runmqchi, runmqlsr, endmqlsr, and runmqtrm are still supported.
MQ v6.0 - migration information
If you specify "process" on the channel definition, a RUNMQCHL process is started. If you specify "thread", the MCA runs on a thread of the AMQRMPPA process, or of the RUNMQCHI process if MQNOREMPOOL is specified. On the machine that receives the inbound allocates, the MCA runs as a thread or process depending on whether you use RUNMQLSR or inetd respectively.
MQ v6.0 - intercommunication
Save Queue Manager :
T42:\MQ\Eines\SaveQmgr\saveqmgr.c
Event Monitor :
T42:\MQ\Eines\EventMonitor\EvMo.c
Work Load Generator : { can send a SWIFT message }
T42:\MQ\Eines\WorkLoader\WLG.c
Has to be capable of reading
We start a Delphi graphical program. It starts a TCP server, listening on a given port. Also, on this PC we have a MQ shared cluster queue, with a name as EventAlarmQ.
On a remote q mgr, an event occurs, as when a queue depth is reached, and a "event" message is written into a local queue. As this queue is defined as "trigger", a local application is launched. This code sends a message to EventAlarmQ, with a Queue Manager parameter included (maybe also a queue index).
On the Monitor pc, the msg reception triggers our "client" code. It reads the message text, and sends it to the TCP (local) server.
The delphi code gets the (remote) queue identifier, and reads the event message. Finaly, this message gets displayed.
| MQ (MB) Monitoring |
Top
|
Start PerfMon and add MQ Queue object and its counters.
MQ Monitoring and Tools (see MQSERIES.NET fora) : Nastel, BMC's BMM-PA (formerly known as QPasa), QFlex : url, Wili, Avada Infrared360, (Candle) Tivoli, Patrol, OmegaMon, Autopilot, ISAlite, amqsailq, amqsmon -> CSV -> Excel, MH-04, MQMON tool, MQ PCF commands, etc.
Que son : QNAMI, Transaction Vision, Cressida ?
QNAMI = monitoring and management solution.
Real-time, end-to-end visibility of the state of business services within the business process.
Bristol Technology
Transaction Vision
IBM : Agente Tívoli OmegaMon XE for Business Integration
Ged.s uses Tivoli OmegaMon.
Allia.z uses Cacti. URL.
En Xtreme Leverage se tiene que bajar el Tivoli Monitoring v6.1 y después el Omegamon XE for Messaging (ver MQ versus MB)
Veure que es "Autopilot TM", monitor de transaccions sobre MQ - http://www.tsg.co.uk/ : With Autopilot TM, you can track each transaction in your MQ network
Long awaited free enterprise strength MQ monitoring solution is finally here. Netflexity, an IT products and services company from Philadelphia, PA, announced that it will release its version of Qflex at no cost. Qflex sports an impressive array of features. It is 100% J2EE compliant web application with comprehensive MQ monitoring and performance tracking capabilities. Web based message browser is a bonus feature. Downloads and more product details are available at www.netflexity.com/QFlex.shtml 2011/12 : http://www.netflexity.com/qflex/index.shtml.
Qflex 2.0.0.0 (19 MB)
Any questions regarding the product
can be posted under Monitoring Tools forum.
Eina comercial : Patrol for MQ :
PATROL for MQ provides true end-to-end availability and is unmatched in its depth of capabilities, which include configuration, performance monitoring, operations management, content management, optimization, recovery and automation. PATROL for MQ is easy to use and offers packaged "out-of-the-box" solutions that can be custom-tailored. It is the most flexible management solution available, easily integrating into a customer's existing IT environment and providing fast implementation and ROI.
Real-time monitoring can be enabled or disabled for individual queues or channels, or for multiple queue or channels. To control individual queues or channels, the queue attribute MONQ, or the channel attribute MONCHL, must be set to enable or disable real-time monitoring. To control many queues or channels together, real-time monitoring can be enabled or disabled at the queue manager level using the queue manager attributes MONQ and MONCHL. For all queue and channel objects whose monitoring attribute is specified with the default value, QMGR, real-time monitoring is controlled at the queue manager level.
Automatically defined cluster-sender channels are not WebSphere MQ objects, so do not have attributes in the same way as channel objects. To control automatically defined cluster-sender channels, use the queue manager attribute, MONACLS. This attribute determines whether automatically defined cluster-sender channels within a queue manager are enabled or disabled for channel monitoring.
To enable both queue and channel monitoring for all queues and channels at the queue manager level, use the following commands:
To control the monitoring capabilities of automatically defined cluster-sender channels use the following command:
To display the monitoring fields collected for this queue, use the following command:
To display the monitoring fields collected for this sender channel, use the following command:
To discover which cluster channel is having problems delivering messages, issue :
MQ v 6 Monitoring, chapter 18. URL
MQ v6 Monitoring, SC34-6593-00
Start the statistics monitoring for queues, channels or both. It creates you a report about all the messages /bytes/puts/gets... that flows through a queue during the time period you plan in the statistics interval.
Reports are placed in the SYSTEM.ADMIN.STATISTICS.QUEUE. You can extract the info with the amqsmon program: "amqsmon -m qmgr -t statistics > output.txt"
The collection of MQI statistics information is controlled by the queue manager attribute STATMQI. Statistics messages are generated only for queues which are opened after statistics collection has been enabled. For example, to enable MQI statistics use the following MQSC command:
Queue statistics information collection can be enabled or disabled for individual queues, or for multiple queues. To control individual queues, set the queue attribute STATQ. Queue statistics information collection can be enabled or disabled at the queue manager level using the queue manager attribute STATQ.
To enable statistics information collection for the queue, Q1, use the following MQSC command:
To enable statistics information collection for all queues that specify the queue attribute STATQ as QMGR, use the following MQSC command:
Channel statistics information collection can be enabled or disabled for individual channels, or for multiple channels, using the attribute STATCHL.
For example, to enable statistics information collection, with a medium level of detail, for the sender channel QM1.TO.QM2, use the following MQSC command:
To enable statistics information collection, at a medium level of detail, for all channels that specify the channel attribute STATCHL as QMGR, use the following MQSC command:
To enable statistics information collection, at a medium level of detail, for all automatically defined cluster-sender channels, use the following MQSC command:
Use amqsmon to display the information contained within accounting and statistics messages in a formatted form. Accounting messages are read from the accounting queue, SYSTEM.ADMIN.ACCOUNTING.QUEUE. Statistics messages are read from the statistics queue, SYSTEM.ADMIN.STATISTICS.QUEUE.
v7 MQ Monitoring, chapter 4, statistics info collection
MP7I, des'2008 : W2003 & MQ v7 - xSeries 365, 4 CPU 3.0 GHz Intel Xeon, 4 GB of RAM
| Local queuing - 2K non-persistent messages | 19.900 round trips / seg |
| Local queuing - 2K non-persistent messages - NON trusted bindings (1) | 15.700 round trips / seg |
| Local queuing - 2K persistent messages | 3.400 round trips / seg |
| Client channels - 2K non-persistent messages | 9.500 round trips / seg |
| Client channels - 2K non-persistent messages - NON trusted bindings (1) | 8.200 round trips / seg |
| Client channels - 2K persistent messages | 2.900 round trips / seg |
| Server channels - 2K non-persistent messages | 12.000 round trips / seg |
| Server channels - 2K non-persistent messages - NON trusted bindings (1) | 9.500 round trips / seg |
| Server channels - 2K persistent messages | 2.100 round trips / seg |
(1) Responder program uses "shared" application bindings. Requester program normally uses "trusted" bindings, except in the "non-trusted" scenario where it uses "shared" bindings.
| Message monitoring |
Top
|
Message monitoring is the process of identifying the route a message has taken through a queue manager network. As a message passes through a queue manager network, various processes perform activities on behalf of the message. By identifying the types of activities, and the sequence of activities performed on behalf of a message, the message route can be determined.
The following techniques are available for determining a message route:
These techniques all generate special messages that contain information about the activities performed on the message as it passed through a queue manager network. The information returned in these special messages can be used to do the following:
| FTP sobre MQ |
Top
|
MQ v 6.0 : Client File transfer & Server File transfer - at \bin we have : mqftrcv.exe mqftrcvc.exe mqftsnd.exe mqftsndc.exe
To see the complete syntax enter the command without any parameters
Uses "Format : MQHRF2 " and "<FILENAME>nom_fitxer.txt</FILENAME>"
(managed) File Transfer
File Extender, para manejar archivos con Message Broker.
PHP as "web version of Perl" ...
I know that it is easy to execute MQ command line calls from within PHP (or any other scripting language)
Linking WebSphere MQ to PHP : url : use our existing web service to take the requests from external vendors and push their XML data back into the queue inside our firewall - mqseries client library : url.
Install the package(s):
Once you have the MQ software extracted, you should have a series of packages.
You'll need to install the "MQSeriesSDK" to get the right libraries in place to compile the PHP extension.
Build the mqseries extension:
Go into the mqseries directory and run "phpize", "./configure" and "make" to create the .so file.
The process should drop it into the default extensions directory.
If needed, move it:
Be sure that the shared module for the extension is in the right directory for the PHP install to find it.
(You can make a phpinfo() page if you're not sure where that is.)
Update your php.ini:
Add in a line to include the extension in your current setup.
Remember, after any changes to the php.ini, you need to restart the web server.
See Philippe Tjon-A-Hen (Joomla user) samples (and API documentation). He says : To compile the extension in your PHP, do as follows:
CPAN MQ Engineering .
MQ Solutions in a Microsoft .NET Environment - 7012 redbook.
Code Project : client/server sample, synchronization,
.Net support pack : MA7P
| Tools / Eines |
Top
|
Llista de certificacions, per número.
Tinc :
998 objectives, assessment tests, training resources
| uSoft - MSMQ |
Top
|
|
Microsoft Message Queuing (MSMQ) technology
enables applications running at different times
to communicate across heterogeneous networks and systems
that may be temporarily offline.
Applications send messages to queues and read messages from queues.
MSMQ provides more reliable message delivery, efficient routing,
security, and priority-based messaging.
It can be used to implement solutions for both asynchronous and synchronous
messaging scenarios.
|
|
To install MSMQ :
To verify MSMQ is installed :
|
Problems :
|
|
MSMQ code samples
|
|
Descripció - [***] Interacting with Message Queues - dibuixos, conceptes, etc [***] Totes les crides, parametres, DLL's, etc SAS integration calls and code samples. |
|
Triggers |
|
MQ/IBM vs MQ/Microsoft (MSMQ). Diferencies. Plataformes que accepten cadascún. |
Amazon Machine Images (AMIs) are available for the following IBM products: url - MQ no hi es (Abril 2010).
| Dubtes |
Top
|
| Velocitat màxima d'un canal (amb Gigabit ethernet a sota) ? |
| rao MQ incorpora pub/sub - JMS & Sun ? |
| Diferencia entre MAXINST i MAXINSTC ? [MQRC=2537] |
| Què és DQM ? |
| Què és "Cuenta conexión" (QuickView) ? |
| Com saber si un gestor de cues és de 32 o de 64 bits ? |
|
Com solucionar tcp/ip rc's 10054 (peer reset) + 10038 (no socket)
en la máquina local ?
{eci ago'09, lpm sep'09}
Solution: Add System Environment variable & reboot:
Set sender channel MCA type to Process/Thread Can you, on your server, get process explorer (www.sysinternals.com), run it, select the listener (runmqlsr) in it, change lower pane view to DLLS, and View->Select Columns->Dll tick the box 'Path'. Change Listener control : [ CONTROL( QMGR | MANUAL | STARTONLY ) ]
PMR 39250,756,000
MQ uses Channel Pooling mechanism (AMQRMPPA) to service incoming connection requests. Channel pooling enables the Queue Manager to distribute the MQ responder threads among multiple AMQRMPPA processes and evenly handle the volume of the inbound connections. When channel pooling is disabled, all the responder threads are spawned in a single MQ listener process, as opposed to distributing the load among multiple AMQRMPPA processes when channel pooling is enabled. This is a known problem with winsock libraries being corrupted by outside products in MQ, like Symantec Personal Firewall, VPN software, SINE, etc. Apparently these applications over-write something in the WinSock libraries which cause MQ channels to break the connection. Setting this variable will force all new listener threads to be handled directly by the runmqlsr process rather than spawning off new threads in the pooling process amqrmppa. Also if you specify "thread", the MCA runs on a thread of the RUNMQCHI process if MQNOREMPOOL is specified (otherwise MCA runs on a thread of the AMQRMPPA process). |
| Per a que és la cua SYSTEM.QSG.TRANSMIT.QUEUE ? |
| Que és exactament un "qmgr cold startup" ? |
|
Quina cua fa servir el MQexplorer ? Resposta : SYSTEM.ADMIN.SVRCONN Quina cua es fa servir per crear remotament una cua ? Resposta : SYSTEM.ADMIN.COMMAND.QUEUE |
|
Perd missatges el MQ ?
Al QM1, crear QA1, cua alias on posa missatges el client. Al QM2, crear QL2, destinació dels missatges.
En un cas "normal",
podem dir que hem construit un sistema
que purga els missatges.
Resposta : no si el missatge es persistent. S'atura el canal ! |
| Per a que serveix el ResolvedQName del PMO/GMO/OD ? |
|
Com comprovar el mecanisme de BackOut ?
Resposta : s'implementa a ma, com a backout.c |
|
Client connection attempts (authority) problems =>
turn on authority events.
ALTER QMGR AUTHOREV(ENABLED)
|
|
Que passa si es omple la DLQ ?
Resposta : si el missatge es persistent, s'atura el canal. |
|
Com controlar els objectes als que pot accedir
un usuari que entra via un SVRCONN ?
Resposta : setmqaut |
| Extended Transactional Client (XA) url |
| Que fa el AMQCRSTA al Solaris, en el lloc del Listener ? |
|
En crear un gestor, tenim un parametre que és
-ls LogSecondaryFiles
The log files allocated when the primary files are exhausted.
Per a que serveix ? |
|
Com fer que els paquets no es desordenin ?
Resposta : message groups |
| Extended Transactional Client (XA) url |
|
Quin tamany té un paquet de COA i/o COD ?
Resposta : 0 bytes, només capçalera ! |
|
Com és que una cua de transmissió es posa GET(DISABLED) ?
Resposta : el altre cantó és al z/OS Solució : parar el canal en el cantó recepció, posant-lo no INACTIVE sino STOPPED. I re-engegar-lo. |
|
Cuando creamos un gestor de colas mediante Scripts,
tiene arranque manual - como hacerlo automático ?
Resposta :
amqmdain is the only supported way to update the registry on Windows |
| Que fer quan trobem al log un MQFB_APPL_FIRST ? |
|
Una cua dinamica pot contenir un missatge persistent ?
Resposta : Nop ! Be aware however that a dynamic replyto queue will not accept persistent messages ... |
| Qué nassos és "AMQZFUMA = Object authority manager (OAM)" |
|
Es pot compartir en cluster una cua Remota ?
Resposta : Of course ! |
| FASTPATH - que és ? |
| Que vol dir "AMQ7017: Log not available." ? |
|
Un MQ Client - on escriu els seus problemes, tipus AMQERR01.LOG ?
Resposta : <mq install directory>\Errors |
| Es millor tenir un cua amb 3.000 missatges o 3.000 cues amb un missatge ? |
|
Si una aplicació determina que els seus missatges han de anar per ordre,
es a dir que tenen "affinities" entre ells,
com ha de obrir una cua de cluster
per a que tots els missatges segueixin el primer ?
Resposta : specify MQOO_BIND_ON_OPEN. MQ v6 QM Clusters, SC34-6589-01, page 60 [78/201] |
| On es troben dins el MQ les MQ JMS libraries ? |
|
Si una cua Alias es NO Persistent,
però apunta a una cua Local que SI es Persistent,
es salvarà el missatge d'una caiguda del sistema ?
I si és a l'inrevés ?
Resposta : es fan servir les caracteristiques de la cua on es fa el MQ_Open() ! |
| Un canal ha de tenir el mateix nom als dos cantons de la definició ? Si es comprova ... qui ho comprova ? ... qué més es comprova ? |
| Hay 35.000 mensajes en una cola. Necesito reiniciar la máquina. Se perderán los mensajes ? (cómo saber si son persistentes) |
| Can we create a dynamic Remote queue ? |
|
Com accedir a MQ v 6.0 des Rexx ?
[T42:\Rexx\MQI\SEBAS.CMD]
OS/2 had MA31; w/NT had MA77. Sample code. |
| If a Sender channel has a Host Name (not an IP + port) specified in the CONNAME field, how many times will the DNS be used ? |
|
AMQ9002 (channel started)
followed by immediate
AMQ9001 (channel stopped) ...
SSL ?
How to Trace ?
Channel has SSLCAUTH(REQUIRED) !? QMGR has SSLKEYR path specified, but does not exist on disk ... Sender side of the channel had LOGs filled with "RESOLVE" problems. |
|
Com faig per instalar només MQExplorer ?
Suposo que cal instalar també el Client ...
No - en v6 el Explorer va amb Eclipse. Però ens cal el MQ Server per Windows ! |
| Com es fa servir RCRMQOBJ ? Amb Log lineal funciona sempre. Amb circular, si no s'han trepitjat els logs. |
| Com es fa per fer un MULTI-HOP ? Page 14, Intercommunication v 6.0 |
| SiBus == Java-only MQ. Qui ho va imposar ? |
|
NameLists ? ("Acc") |
|
Un Client MQ versió 5.3 pot anar contra un MQ Server versió 6.0 ? I un Client versió 6 contra un Server versió 5.3 ? |
| Explicació detallada del Requester Channel. Can be started from the transmiter end ? Quan es fa servir ? |
| Display MQ counter using WMI ! Code here |
| Alert / event monitor - get code from "Event Monitorig" book. |
| Tracing |
| HeartBeat and KeepAlive |
| Pot un MQ (AIX al BS) conectarse a 2 màquines W2K que estiguin en un Cluster de 2 QMgrs's, en el lloc que abans hi havia una sola màquina, sense fer cap canvi ? |
|
Pot un MQ_Client escriure en una cua
amb definició múltiple dins un cluster ?
Resposta : of course. |
|
Que es posa en el camp "Destination Queue Manager" quan
s'escriu en una cua amb definicions múltiples en un cluster ?
En Angel diu que el Qmgr local ...
El camp de destinació no s'escriu mai : s'agafa de la cua remota on es posa el missatge. Quan es treballa en un cluster, no hi es. |
|
Com s'esborra "completament" (o "correctament") un Cluster ?
Vaig esborrar els 2 QMGRs, però el Cluster no es deivaxa ... Hide, then try to Un-Hide : it's gone ! |
|
T30 em dona -
TCP/IP return code (ioctlsocket) has been 10038 (X'2736')
MS knowledge base article Q319952 Search IBM ! (24 results) Nice description
Apparently the problem is related to the unability of Windows to pass an open socket between processes in some circumstances.
Setting MQNOREMPOOL keeps the socket in the listener process, the handler for the socket is a thread.
In my particular case I suspect the presence of the Aventail transparent socksifier software
(within IBM aka IBM SINE client).
This software is known to break sockets based programs in several ways (e.g. cygwin's sshd)
even if it is not active.
The 10038 return code indicates that the MQ listener pool has had trouble passing the initial socket from the listener to the pool. This is rather common in environments that have a firewall. This can be worked around by disabling the pool with an environment variable: set MQNOREMPOOL=1 : System Properties + Advanced + System Variables. 14/10/2005 Also, Aventail removed. OK ! (also X-Server runs again) |
|
Es pot calcular el throughput d'una cua ?
I d'un canal ?
Que tal 35 MB/sec ? Poc en un entorn "gigabit" ... |
| Pot una aplicació client conectarse SIMULTANEAMENT a diversos queue managers ? |
| Es millor tenir 1.000 threads en Wait() de MQGET() o fer un Trigger de un Process a l'arribada de cada missatge ? I si parlem de 200 missatges per segon ? |
|
Detalls del 2-way commit
XA (distributed) transactions
From
here :
A couple of notes on 2-phase commit; it is used
|
|
What is the difference between client mode and binding mode in MQ ?
In client mode you use a channel connection via network
(may be on the local machine), to connect to a QMgr.
The bindings method is faster, more secure, uses two-phase-commit
and works without active listener.
|
|
Display MQMD field :
printf( "Message PutDate: [%.*s].\n", MQ_PUT_DATE_LENGTH, md.PutDate ) ;
Display Queue Name :
printf( "Q name (%.48s).", mqmd.ReplyToQ ) ;
|
|
Dubtes BdE :
Nociones de programación JMS
Ejemplo de creación de un MDB Configuración en WAS del Message Listener Service. Detalle de los parámetros de los listener ports y los pools de los threads de los MDBs. Conexiones de MQ cliente en WAS Revisión de las definiciones hechas en MQ JMS provider: definiciones a nivel de server, celda. En caso de tener clusters, cómo se recuperan los mensajes si se cae uno de los clones. Suplantación de usuario desde WAS: JMS o APIs de MQ. Clusters de MQ. Clusters de AIX. Clusters de WIN. Colas compartidas. Automatización de Retrys de canales RRS o no para commit en DB2 y MQ MQCOMMIT cada "n" PUTS (1380?). Implicaciones en el tráfico de ficheros. Qué hacer si se llena una cola de aplicación. Qué hacer si algo va mal con ficheros del sistema (bootstrap, pageset, .) ¿Se puede crear una cola dinámica remota a otro QMGR? ¿Al crear una cola dinámica se puede modificar algún parámetro de la definición del modelo ? >sag< Mensajes en la dead-letter-queue sin razón aparente. Error en triggering. Consideraciones en el paso de WAS de internet a red interna con MQ. Consideraciones al conectar MQ de HOST con una entidad externa con LU.6.2. Políticas de BACKUP y ARCHIVE LOG. Si se instala en cluster activo pasivo de MQ en AIX sin ipcs, hay problemas. Se instala el sofware en los nodos locales y en grupo de volumenes var/mqm. ¿Como se aplican parches en HACMP ? Migrar MQ de v 5.3 a v 6 ? Si se ejecuta /opt/mqm/bin/amqiclen -v -c -m qmgr_name < /var/mqm/mqs.ini sin necesidad, pasa algo?. Al parar MQ con kill -9, ¿ es necesario parar el controlador de proceso amqzxma0, el último?. |
|
Dubtes Acc
a. Colas persistentes/no persistentes.
b. Control de backout. MQ/DB2/CICS commitment. c. Utilidad de los Namelists. d. Colas de iniciación en host/NT. e. CKTI - Monitorización. f. CICS Bridge/CICS adapter. g. Como gestionar la longitud de los mensajes sin desperdiciar memoria en COBOL-CICS. Punteros / campos de longitud variable. h. Seguridad en MQ. Comunicación TCP-IP/mainframe. RACF que nos proporciona, es necesario implementar seguridad en la aplicación. i. Pruebas de carga. Problema Acc
1) accedim a Host OK des Java
2) desconectem el cable - the MQGET() produces a RC = 2009, MQRC_CONNECTION_BROKEN. 3) el programa fa un DISC() i després un CONN() 4) al Host s'observen 2 canals Solució : Have a look at the adoptmca attributes of the qmgr here: url |
|
Dubtes T-sys Antes : Aplicacio <--> AIX + CICS Transaction Gateway <--> z/OS + CICS
Despues : Aplicacio <---> AIX + WAS + MQ Client <---> AIX + MQ Server <---> z/OS + MQ Bridge + MQ Server + CICS
|
| CBE [thomas] |
|
How to connect to a Server-Channell without MQ-server ? MQIPT, MSMQ, JMS bridge, Active MQ, ... |
Punts a millorar :
V 6.0 Information Center
Apache ActiveMQ is an open source (Apache 2.0 licensed) message broker which fully implements the Java Message Service 1.1 (JMS). wiki. Mine.
MOM : RabbitMQ (implementa AMQP), StromMQ, 0MQ ...
Tuxedo (Transactions for Unix, Extended for Distributed Operations) is a middleware platform used to manage distributed transaction processing in distributed computing environments. Tuxedo is a transaction processing system or transaction oriented middlew are, or enterprise application server
Habari client libraries ... provide access to standards-based, enterprise quality solutions for distributed messaging.
Mira que m'envia en Albert :
| URLs |
Top
|
|
|
Site under construction. |
|
Actualitzat el 22/5/2012 (a).
|
|