| home / infca / mq (navigation links) | El placer da lo que el pensamiento promete - Voltaire |
| AMQMDAIN | Open count | Create Qmgr | script samp | Start channel | v 6.0, v 7.0 (ext) | RCs | Best Practices | QN resolution | Guidelines | Auditoria | Other | URLs | End |
Atencio : fes servir un navegador "sense bloquejador de anuncis" !
2018 :
2019 : va al <head> !
Read some (v6) Fundamentals.
Best url
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:
El resum de les comandes es :
Si el msg es no persistent, es perd i al fitxer AMQERR01.LOG trobem :
Si el msg es persistent, no es perd doncs s'atura el canal a la banda de recepcio i al fitxer AMQERR01.LOG trobem :
|
| 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.
Filter RC's by :
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]
Compte : moving to API module
| Sample / 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 | (triggered program) MQPUT1() a msg to ReplyToQueue (sent by amqsreq maybe) - see QM_resolution_sample or AMQSECHA_modificat o QNR.C |
| amqsgbr0.c | Browse messages, text only (use amqsbcg for text and header) |
| amqsget0.c | MQGET() sample - Get a message |
| amqsgrma.c | Get reference messages from a queue. Checks that the objects, identified in the messages, exist |
| amqsinqa.c | (triggered program) - MQINQ() sample - 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 |
| amqspuba.c | Publish messages to a topic {subscribed by amqssuba} |
| amqsput0.c | MQPUT() sample - 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 | (triggered program) - MQSET() sample |
| amqsspin.c | SSPI Channel Exit routines (Security) |
| amqsstop.c | Inquire on all the connections for a selected process and request them to be stopped |
| amqssuba.c | Subscribe and get messages from a topic using a managed destination queue {published by amqspuba} |
| 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 |
(1)
dis qstatus(SYSTEM.CHANNEL.INITQ) type(handle) all => runmqchi
(2)
dis qstatus(SYSTEM.ADMIN.COMMAND.QUEUE) type(handle) all => amqpcsea
(3)
dis qstatus(SYSTEM.DEFAULT.INITIATION.QUEUE) type(handle) all =>
Queue config
Queue status
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
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 (MQLONG) - indicates how the queue was defined
Page 445, MQ v 6.0, "MQSC Command Reference", SC34-6597-00
Mind MaxInstances - maximum number of simultaneous instances of an individual server-connection channel that can be started.
Also "MaxChannels=1000" in qm.ini
How can I display the actual value in use ?
| Type of object | MQCO_NONE | MQCO_DELETE | MQCO_DELETE_PURGE |
|---|---|---|---|
| Object other than a queue | Retained | Not valid | Not valid |
| Predefined queue | Retained | Not valid | Not valid |
| Permanent dynamic queue | Retained | Deleted if empty and no pending updates | Messsages deleted; queue deleted if no pending updates |
| Temporary dynamic queue (call issued by creator of queue) | Deleted | Deleted | Deleted |
| Temporary dynamic queue (call not issued by creator of queue) | Retained | Not valid | Not valid |
| Distribution list | Retained | Not valid | Not valid |
MQ v 6.0, Application Programming Reference, SC34-6596-00, page 334 [359/665]
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]
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
When you open a WebSphere MQ queue,
the MQOPEN call performs a name resolution function on the queue name that you specify.
This determines on which queue the queue manager performs subsequent operations.
This means that when you specify the name of an alias queue or a remote queue in your object descriptor (MQOD),
the call resolves the name either to a local queue or to a transmission queue.
MQ v6.0 Application Programming Guide, page 113/601.
Working directory = \\MQ\Eines\QM_resolution_sample
En definitiva, al gestor QMM1 es fa un MQ_Put1() a la cua i gestor indicats al missatge. Evidentment, no existeixen a QMM1.
\\MQ\Eines\AMQSPUT_modificat\$_ru_qnr.cmd - modificar parametre NOMCUAPOSAR !
Els missatges apareixen al gestor CNT2 :
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
|
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 and/or the messages.
You can define it to the qmgr by using the DEADQ attribute on the ALTER QMGR command (see sample bellow), if you did not do it when qmgr was created.
DLQ must be persistent (DEFPSIST(YES)) and put-enabled !
DLQ monitor : MS71 !
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].
Method #1 :
Define a remote queue pointing to an existing queue manager, but refering to a non-existing remote queue.Find the message in the remote queue manager's DLQ.
Similar but faster : wrong "target" qmgr name for "open()"
Method #2 :
put a message into a XMIT queue, and get RC = d'0271 = MQFB_XMIT_Q_MSG_ERROR
Feedback indicating that a message channel agent has found that a message on the transmission queue is not in the correct format. The message channel agent puts the message on the dead-letter queue using this feedback code.Requires a Running channel !
Find the message in the local queue manager's DLQ.
Method #3 :
Define a cluster of 3 queue managers : TQM1, TQM2 and TQM3.
TQM1 and TQM2 share the queue WLMQ1 on the cluster. This is, TQM3 sees two "cluster" queues.
On TQM3, define an ALIAS for WLMQ1, named WLMAQ.
If an application writes - connecting to TQM3 - into WLMAQ, then the messages are split between WLMQ1 on both TQM1 and TQM2.Now, define a queue manager external to the cluster, named TQM4.
Define a REMOTE QUEUE on it, called RMQ99, pointing to WLMAQ on TQM3. And a CHANNEL also ... and activate it !
If an application sends a message connecting to TQM4 and using this Remote Queue RMQ99, it is placed in the TQM3's Dead Letter Queue with Reason Code d'2082 = MQRC_UNKNOWN_ALIAS_BASE_Q - Read about Dead-Letter Header.
Method #4 :
Attempt to receive a persistent message on a temporary dynamic queue. The message will fail and be routed to the DLQ with reason code: wrong persistence attribute.
Method #5 :
Send a message to Command Server, but not a Request Type :
md.MsgType = MQMT_REQUEST ; \\MQ\Eines\PCF_Inquiry_qmgr_Queues\codi.c
Method #6 :
Write to a cluster queue. Messages are always accepted. If a queue gets filled up, messages go to DLQ, Reason d'2053, x'0805
Method #7 :
Compile AMQSECHA using GCC or CL (v12) compiler. Set it into a triggered process using APPLICID. As RUNMQTRM wont be able to start the EXE, then the trigger message shall go to DLQ, and DLQH indicates 00.00.01.09
RFHUtil + Read Queue + "DLQ" + uncheck "Include DLQH" on last Tab + Write Queue + "Q1" + and msg is on Q1, without DLQH
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
Que fem si el MB posa un msg a la DLQ amb Dead Letter Header i amb Reason = MQFB_APPL_FIRST ? Mirar Event Log per problemes de Broker !
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
Then run the following command (Unix sample)
Using DLQ handler, developerWorks
Sending messages to a distribution list
In MQ on all platforms except z/OS,
an application can send a message to several destinations
with a single MQPUT call.
This applies in both a distributed-queuing environment
and a clustering environment.
You have to define the destinations
in a distribution list,
as described in the MQ Application Programming Guide.
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
Message properties
There is a type of application that it needs to add information to a message, This information is used by some applications during the lifetime of the message but ignored by other applications. Examples might be routing information, accounting and billing information and a whole range of metadata not directly concerned with the message payload. Many vendor products might want to "enrich" messages in this way. In V7 applications can add properties to messages using new MQI calls. A property is a named piece of data. It is not treated as part of the message payload. The properties are accessed by means of a message handle passed to MQPUTs and MQGETs in the MQPMO and MQGMO. Applications will only be aware of this information if they choose to access it. In V6 MQRFH2 headers are used to store MQ JMS properties. Since v7, we dont use MQRFH2 but Message Properties. The message properties are a set of name, value pairs. The name-space for the property names is made hierarchical by splitting the name into components separated by dots. API summary
| ||
|
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 : only local or model. 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 developerWorks |
A channel is a communication link used by distributed queue managers. MCA max speed = 35 MB/sec.
Do not confuse message channels with MQI channels. 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:
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 [\03x\{isb}\mqmon.asp] !
Com saber quants missatges han passat per un canal ?
Per una cua ?
Event monitor
|
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
|
||||||||||
|
Script sample(s)
* Dead Letter Queue must always be present.
DEFINE QLOCAL(QL.DLQ) +
DEFPSIST(YES) +
MAXDEPTH(5000) +
MAXMSGL(104857600) +
replace
alter qmgr DEADQ('QL.DLQ')
* 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_cli_user')
* Define a queue and a pointer to it, to be used by applications
DEFINE QL('QL1') USAGE(NORMAL) REPLACE
DEFINE QALIAS('QUSER.TT.IN') TARGQ('QL1') REPLACE
Special commands
|
||||||||||
It is very useful to have this configuration : DEFINE CHANNEL ('TOSERVER') CHLTYPE(SVRCONN) +
MCAUSER('mqm_cli_user') +
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. |
amqmtbn - alert monitor (taskbar) - net stop "IBM MQSeries"
amqhasmn.exe - the logger
amqmsrvn.exe - COM server
amqmtbrn.exe - alert monitor (task bar icon)
amqpcsea.exe - command server
amqrmppa.exe - channel pooling process
amqrrmfa.exe - repository process (for clusters)
amqsvc.exe - .
amqxssvn.exe - shared memory server(s)
amqzdmaa.exe - deferred message processor
amqzfuma.exe - OAM process - rc = 2035
amqzlaa0.exe - queue manager agents (LQM agents)
amqzllp0.exe - checkpoint processor
amqzxma0.exe - processing controller, execution controller {kill qmgr in fact} - process id "1"
runmqchi.exe - channel initiator
runmqlsr.exe - listener
Read An Introduction to WebSphere MQ queue manager processes (mq v6)
Description of MQ tasks :
Job name Function
AMQALMPX The checkpoint processor that periodically takes journal checkpoints.
AMQCLMAA Non-threaded TCP/IP listener. {RUNMQLSR is non-threaded}
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 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. Critical processes transaction logging.
AMQZMUR0 Utility manager. Do critical utilities, as the journal chain manager. Restartable processes transaction logging.
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. {AMQCLMAA is non-threaded}
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 channel pooling process
amqrrmfa repository process (for clusters)
amqzdmaa deferred message processor
amqpcsea 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 ! |
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) +
descr('QMGR1 to QMGR2 sender') replace
def channel(QMGR2.TO.QMGR1) chltype(rcvr) +
trptype(tcp) replace
def qlocal(QMGR2) like(SYSTEM.DEFAULT.LOCAL.QUEUE) +
share usage(xmitq) replace
def qremote('TO.QMGR2') +
like(SYSTEM.DEFAULT.REMOTE.QUEUE) xmitq(QMGR2) +
rname('FROM.QMGR1') rqmname(QMGR2) replace
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) +
descr('QMGR2 to QMGR1 sender') replace
def channel(QMGR1.TO.QMGR2) chltype(rcvr) +
trptype(tcp) replace
def qlocal(QMGR1) like(SYSTEM.DEFAULT.LOCAL.QUEUE) +
share usage(xmitq) replace
def qremote('TO.QMGR1') +
like(SYSTEM.DEFAULT.REMOTE.QUEUE) xmitq(QMGR1) +
rname('FROM.QMGR2') rqmname(QMGR1) replace
def qlocal('FROM.QMGR1') replace
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
Publib : URL : see Linux 32 vs 64-bit 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 ! |
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 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)
Dev-C++ :
Superseded by Orwell. Homepage. Docu. Em baixo 43.693.756 Dev-Cpp 5.5.3 TDM-GCC x64 4.7.1 Setup.exe
Despres de incloure "c:\mq\tools\c\include" en els directoris de les opcions del compilador, diu 3584 2 C:\MQ\tools\c\include\cmqc.h [Error] unknown type name '_int64'
Solució : #ifndef _int64
#define _int64 long long
#endif
Perfect compilation : (see more flags using "gcc --help") c:\"Program Files (x86)"\Dev-Cpp\MinGW64\bin\gcc amqsecha.c -I"c:\mq\tools\c\include" -L"c:\mq\tools\Lib64" -o AMQSECHA.EXE -lmqm
Els programes de MQ no compilen be amb GCC - no abaca be el MQCONN() - see "\\MQ\Eines\AMQSPUT_modificat\tmp\"
or "\\MQ\Eines\Samples\put\"
Building MQ C++ programs : supported compilers Guindous : use the Microsoft Visual Studio C++ compiler. Visual Studio Express 2013 for Windows Desktop. VS2013_RTM_DskExp_ENU.iso -> wdexpress_full.exe -> C:\Program Files (x86)\Microsoft Visual Studio 12.0 |
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 :
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]
PAN (Positive Action Notification) or a NAN (Negative Action Notification) event ... < Pending
This indicates whether the message survives system failures and restarts of the queue manager.
Message persistence
Persistent messages are written to logs and queue data files.
If a queue manager is restarted after a failure,
it recovers these persistent messages as necessary from the logged data.
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.
No such thing as a persistent queue! ... but ... "Except for temporary dynamic queues", he told me with a grin, "they’re pretty much ALL persistent. Once you define 'em, they never go away." T. Rob
The messages may have come through an alias or a QRemote where DEFPSIST(NO) was set.
Default:
Problema : 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.
Imagine this setting :
Per cada "Data Source"
Ben Ritchie at DeveloperWorks article
A guindous tenim:
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.
We define two scenarios for global units of work:
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, then the (Windows) default values are not enough. Para tener un log circular de 1,28 GB codificaremos: $ crtmqm –u QDLQ –lc –lf 16384 –lp 20 –ls 10 –g gsmfct -ld nnn –md nnn NOM
# si usamos ficheros de 64 MB (16384 x 4 KB) ...
# y tenemos 20 de estos ficheros (-lp) ...
# ... entonces tendremos un log circular de 1280 MB (20 x 64 MB)
Message filtering
{bestp}
My rough guidelines -log calculation best practices
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, is PERSISTENT, and has a very large max depth (eg 500000)
Make sure transmit queues have a large max depth (eg 50000)
LOG file(s) missing
C:\> strmqm TQM4
WebSphere MQ queue manager 'TQM4' starting.
AMQ7017: Log not available.
C:\>dltmqm TQM4
AMQ8101: WebSphere MQ error (893) has occurred.
C:\>dltmqm TQM4
AMQ8118: WebSphere MQ queue manager does not exist.
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. |
|
Has a default capacity of 256 KB (2 MB after v7.1)
Can be changed in the QMErrorLog stanza in the qm.ini file.
The log file sizes can be tuned using the MAXMQERRORLOGSIZE environment variable, the qm.ini file and/or the QMgr attributes in the WebSphere MQ Explorer Extended Attributes panel.
url
Also can be acessed under Websphere MQ Explorer -> <qmgr_name> -> Properties -> Extended.
On UNIX and Linux systems, if you do not want certain error messages to be written to a queue manager error log, you can specify the error codes that are to be ignored using the QMErrorLog stanza.
Read here how to do it on Win systems :
Solution: use the environment variable MQS_FORCE_NTLANGID. Thanks, Jason ! MQS_FORCE_NTLANGID=3081 (0x0C09) - Spanish = 0x2C0A ;
To display actual values, do:Para que podamos decir que una instalación de MQ está plenamente funcional, debe cumplir con todos los requisitos siguientes.
Tambien podemos decir que son una serie de pasos a verificar cuando se encuentra algún problema con el MQ, es decir, un botiquin de primeros auxilios.
(1)
(2)
(3)
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 ; // #define MQMF_SEGMENTATION_ALLOWED 0x00000001
queue.put ( message, pmo ) ;
...
PMO.Options = (existing options) ;
MQPUT MD.MsgFlags = MQMF_SEGMENTATION_ALLOWED ;
Receiver : ...
MQGetMessageOptions gmo = new MQGetMessageOptions() ;
gmo.options = MQC.MQGMO_FAIL_IF_QUIESCING | MQC.MQGMO_COMPLETE_MSG | MQGMO_ALL_SEGMENTS_AVAILABLE ;
queueIN.get ( retrievemqmessage, gmo ) ;
...
GMO.Options = MQGMO_COMPLETE_MSG | (existing options)
MQGET
Ver "MQ v 5.1_Planning Guide_GC33-1349-08.pdf" y "MQ Application Programming Guide". 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 : [\\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, v7 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 (using Bindings)
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)
2538 - listener is not running on server (client connection attempted)
Client envir : 2009, 2018, 2019 2033, 2119, 2080, 2079, 2016, 2051, 2059, 2162 API CC's & RC's : on-line. |
Best practices experts chat.
More best practices:
Mind
I like :
Samples :
Reason for convention:
Few come from The top 15 WebSphere MQ best practices - gracias, Francisco !
More best practices : shared queues and application programs.
Mind there are MB Best Practices also, and MQ @ HACMP Best Practices too.
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.
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.
runmqlsr listens for new connections, then hands them off to amqrmppa. If you stop a listener, it has no impact on channels already running, but new incoming connections obviously will fail.
I prefer 'Admin' channels to have their own listener.
I have multiple Listeners on my Edge Queue Manager. Each incoming connection from another company has its own RCVR channel, and each company is told to use a specific port into my QM. Firewall rules prevent them from trying others.
Compte : "endmqlsr" ends all qmgr listeners - use GUI to stop a specific one
The backlog number would only apply for a MQ listener. After a listener program (like the MQ listener runmqlsr) has done a bind to a port like 1414, it will then call the listen() function to convert the socket into a passive or listening socket. One of the arguments that the program gives to the listen function is a backlog count. This number is used by the TCP implementation to create a unique backlog queue for this specific listening socket. So if you have 3 MQ listeners on say port 1414, 1415, 1416, each listener has its own backlog queue. This backlog queue is used to store partially established connections or established connections that have not been accepted by the MQ listener program. So this backlog count is just specific to an MQ listener and is used to adjust how many TCP connections that the listener has not accepted can queue up until they are discarded.
So you would probably want to consider adjusting the backlog number on a MQ listener if you feel that your listeners are getting overwhelmed with connection requests and you are finding evidence that some of these TCP connection requests to your listener are being dropped.
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
Guess it has to be done using MQ_CONNX ! Structure has to be similar to Delphi multi-threading, ain't I right ? We can use WireShark to learn the details (and post them here) {Server2Server or Client2Server}
Save Queue Manager :
\\MQ\Eines\SaveQmgr\saveqmgr.c
Event Monitor :
\\MQ\Eines\EventMonitor\EvMo.c
Work Load Generator : { can send a SWIFT message }
\\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.
Since MQ v 6.0, we have Client File transfer & Server File transfer, but only under windows and linux x86 platform servers
A \\mq\bin we have :
To see the complete syntax enter the command without any parameters
Uses "Format : MQHRF2 " and "<FILENAME>nom_fitxer.txt</FILENAME>"
Can be used within your own script/batch files to (1) send, (2) list or (3) receive files:
Managed File Transfer is MQFTE !
File Extender, para manejar archivos con Message Broker.
File processing options with MB File Extender
File Extender [jj]
Think of 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 for PHP : url.
CPAN MQ Engineering group.
Philippe Tjon-A-Hen (Joomla user) has a very good PHP page, with lots of good PHP samples
On getting started he says: to compile the extension in your PHP, do as follows
See PHP install and PFP for MQ install.
Here are the samples (and API documentation):
To start with we define an array with connect options.
Once that is setup we can call the mqseries_connx method.
Next two calls are to illustrate how different mqseries_open methods work. The first opens an object of type queue manager for inquiry. The returned $obj handle can then be use as an input parameter when calling the inq method.
The second open simply opens a queue residing on the connected queue manager. This can either be a local queue, remote queue or even a queue alias.
Important here is the $obj and $obj_snd parameters. These are "call by reference" passed to the open methods. Afther successful completion of the method these hold the MQSeries object handle, which should be used when calling methods that work on mqseries objects.
In the next part an inquiry is made on the Queue Manager object and on the Queue object.
Note the 48 as the size of the expected character attribute. This is not the size of the &char_attr itself as in PHP we cannot specify a buffer. The parameter is needed to allocate enough memory that the method can succeed.
Finally we close the opened objects. Garbage collection is also done by the extention not closing object or connection will be closed by the extention.
And finally we close the connection.
Investigar callback : MQCB() i MQCTL() - see sg24-7583, v7 enhancements
CICS samples, from CICS Integration with MQ
Sample \\mq\tools\c\samples\amqscbf0.c code ...
MQ Solutions in a Microsoft .NET Environment - 7012 redbook.
Code Project : client/server sample, synchronization,
.Net support pack : MA7P
In case of problems, use verbose trace:
Clients:
Servers:
Results :
Llista de certificacions, per número.
Tinc :
2012 :
998 objectives, assessment tests, training resources
| Dubtes |
Top
|
|
Com saber si passen missatges (de dades) per un canal (de cluster) ?
Com saber si s'estan escrivint/treient missatges en una cua ? |
| No funciona MO71 amb MQ v 7.5 ? |
| Com visualitzar si un QMGR te SingleWrite o TripoleWrite (runtime) ? |
|
Com era la comanda per re-construir els objectes de sistema del gestor ?
Resposta : strmqm -c qmgr-name |
| Que es HiperVisor per RH ? |
| per a que serveix el CSSID del gestor ? |
| com visualitzar el Local MQM SID actual ?
A vegades trobo un FDC amb: Active LockFile MQM SID
0012F6D0 532D312D 352D3231 2D323833 S-1-5-21-283
0012F6E0 37363437 3032372D 32333535 36313134 7647027-23556114
0012F6F0 39322D32 35313032 34313739 342D3130 92-2510241794-10
0012F700 30363030 36000000 00000000 867815FB 06006.......†x.û
0012F710 9D88CD01 867815FB 9D88CD01 51756575 ˆ..†x.ûˆ..Queu
0012F720 654D616E 61676572 53746174 75730000 eManagerStatus..
0012F730 00000000 00000000 ........
Local MQM SID
0012F330 532D312D 352D3231 S-1-5-21
0012F340 2D323833 37363437 3032372D 32333535 -2837647027-2355
0012F350 36313134 39322D32 35313032 34313739 611492-251024179
0012F360 342D3130 3036004E 10020000 01000000 4-1006.N........
0012F370 C4F41200 A4F31200 04010000 A0F31200 .ô..¤ó...... ó..
0012F380 C8F51200 509FB500 EE79834E 09000000 .õ..PŸµ.îyƒN ...
0012F390 00000000 00000000 1013B600 ..........¶.
|
| Velocitat màxima d'un canal (amb Gigabit ethernet a sota) ?
35 MB/sec ! |
| 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 |
|
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 ?
Resposta : mirar el log d'errors de MB |
|
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)"
Resposta : sends rc = 2035 ! Read here |
|
Es pot compartir en cluster una cua Remota ?
Resposta : of course ! |
|
Pot un MQ_Client escriure en una cua
amb definició múltiple dins un cluster ?
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 |
|
És millor tenir un cua amb 3.000 missatges o 3.000 cues amb un missatge ?
Resposta : millor 3.000 cues, però l'aplicació consumidora ha de saber on és el seu 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 ?
[\\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 ?
Resposta : everytime the channel is started and it opens the TCP socket |
|
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 ? |
|
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 (de MQ Explorer) ?
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 ?
Resposta : of course ! "clients_esgotadors" |
| 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.
|
|
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 ? 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-Channel without MQ-server ? MQIPT, MSMQ, JMS bridge, Active MQ, ... |
Stop the command server and hex-dump the message here ...
What format is required by command server ? MQAI ??
V 6.0 Information Center
Sonic MQ [\\MQ\Competencia\Sonic MQ]
mqjeff :
JMS used with a SonicMQ JMSProvider would feed the JMSInput node.
At that point, there would be no more Sonic code at all.
Everything is now Broker.
This also requires no user code of any kind that knows anything about SonicMQ.
Broker can easily, using a JMS->MQ Transformation node, convert the JMS headers into a set of MQ headers, which could then be output using an MQOutput node.
Three Broker nodes, all fully supported, no custom user code at all....
| 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).
See also amqp products
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), StormMQ, 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 middleware, or enterprise application server
Habari client libraries ... provide access to standards-based, enterprise quality solutions for distributed messaging.
mq-light @ developer.ibm.com
You can start working with the MQ Light Node.js API by installing it to your working directory using
Make it possible to administrate your Websphere MQ environment with your favorite browser or programming language
mq web app is the official web application for MQWeb.
Commands
Configuration
Links, urls :
{Peter & Saper & Luisa} Cluster Queue Monitoring sample program (AMQSCLM) :
7.1
7.5
The cluster queue monitoring sample program uses the IPPROCS (open for input process count) value of a queue
to determine whether that queue has any consumers.
A value greater than 0 indicates that the queue has at least one consuming application attached. Such queues are active.
A value of 0 indicates that the queue has no attached consuming programs. Such queues are inactive.
The cluster queue monitoring sample program activates a cluster queue by setting the local CLWLPRTY value to 1.
The program deactivates a cluster queue by setting its CLWLPRTY value to 0
CLWLPRTY(integer)
Specifies the priority of the queue for the purposes of cluster workload distribution.
This parameter is valid only for local, remote, and alias queues.
The value must be in the range zero through 9 where zero is the lowest priority and 9 is the highest.
See mq_admin
Mira que m'envia en Albert :
| URLs |
Top
|
|
|
Site under construction. |
|
Updated 20190531 (a)
|
|