Availability: All.
Purpose: The MQXQH structure describes the information that is prefixed to the application message data of messages when they are on transmission queues. A transmission queue is a special type of local queue that temporarily holds messages destined for remote queues (that is, destined for queues that do not belong to the local queue manager). A transmission queue is denoted by the Usage queue attribute having the value MQUS_TRANSMISSION.
Format name: MQFMT_XMIT_Q_HEADER.
Character set and encoding: Data in MQXQH must be in the character set and encoding of the local queue manager; these are given by the CodedCharSetId queue-manager attribute and MQENC_NATIVE for the C programming language, respectively.
Set the character set and encoding of the MQXQH into the CodedCharSetId and Encoding fields in:
Usage: A message that is on a transmission queue has two message descriptors:
The separate message descriptor is the one that is returned to the application in the MsgDesc parameter of the MQGET call when the message is removed from the transmission queue.
The embedded message descriptor is always a version-1 MQMD. If the message put by the application has nondefault values for one or more of the version-2 fields in the MQMD, an MQMDE structure follows the MQXQH, and is in turn followed by the application message data (if any). The MQMDE is either:
The embedded message descriptor is the one that is returned to the application in the MsgDesc parameter of the MQGET call when the message is removed from the final destination queue.
Fields in the separate message descriptor: The fields in the separate message descriptor are set by the queue manager as shown below. If the queue manager does not support the version-2 MQMD, a version-1 MQMD is used without loss of function.
Field in separate MQMD | Value used |
---|---|
StrucId | MQMD_STRUC_ID |
Version | MQMD_VERSION_2 |
Report | Copied from the embedded message descriptor, but with the bits identified by MQRO_ACCEPT_UNSUP_IF_XMIT_MASK set to zero. (This prevents a COA or COD report message being generated when a message is placed on or removed from a transmission queue.) |
MsgType | Copied from the embedded message descriptor. |
Expiry | Copied from the embedded message descriptor. |
Feedback | Copied from the embedded message descriptor. |
Encoding | MQENC_NATIVE (see note below) |
CodedCharSetId | Queue manager's CodedCharSetId attribute. |
Format | MQFMT_XMIT_Q_HEADER |
Priority | Copied from the embedded message descriptor. |
Persistence | Copied from the embedded message descriptor. |
MsgId | A new value is generated by the queue manager. This message identifier is different from the MsgId that the queue manager may have generated for the embedded message descriptor (see above). |
CorrelId | The MsgId from the embedded message descriptor. |
BackoutCount | 0 |
ReplyToQ | Copied from the embedded message descriptor. |
ReplyToQMgr | Copied from the embedded message descriptor. |
UserIdentifier | Copied from the embedded message descriptor. |
AccountingToken | Copied from the embedded message descriptor. |
ApplIdentityData | Copied from the embedded message descriptor. |
PutApplType | MQAT_QMGR |
PutApplName | First 28 bytes of the queue-manager name. |
PutDate | Date when message was put on transmission queue. |
PutTime | Time when message was put on transmission queue. |
ApplOriginData | Blanks |
GroupId | MQGI_NONE |
MsgSeqNumber | 1 |
Offset | 0 |
MsgFlags | MQMF_NONE |
OriginalLength | MQOL_UNDEFINED |
Fields in the embedded message descriptor: The fields in the embedded message descriptor have the same values as those in the MsgDesc parameter of the MQPUT or MQPUT1 call, with the exception of the following:
When a distribution-list message is split into smaller distribution-list messages placed on different transmission queues, the MsgId field in each of the new embedded message descriptors is the same as that in the original distribution-list message.
Putting messages on remote queues: When an application puts a message on a remote queue (either by specifying the name of the remote queue directly, or by using a local definition of the remote queue), the local queue manager:
Putting messages directly on transmission queues: An application can also put a message directly on a transmission queue. In this case the application must prefix the application message data with an MQXQH structure, and initialize the fields with appropriate values. In addition, the Format field in the MsgDesc parameter of the MQPUT or MQPUT1 call must have the value MQFMT_XMIT_Q_HEADER.
Character data in the MQXQH structure created by the application must be in the character set of the local queue manager (defined by the CodedCharSetId queue-manager attribute), and integer data must be in the native machine encoding. In addition, character data in the MQXQH structure must be padded with blanks to the defined length of the field; the data must not be ended prematurely by using a null character, because the queue manager does not convert the null and subsequent characters to blanks in the MQXQH structure.
However, the queue manager does not check that an MQXQH structure is present, or that valid values have been specified for the fields.
Getting messages from transmission queues: Applications that get messages from a transmission queue must process the information in the MQXQH structure in an appropriate fashion. The presence of the MQXQH structure at the beginning of the application message data is indicated by the value MQFMT_XMIT_Q_HEADER being returned in the Format field in the MsgDesc parameter of the MQGET call. The values returned in the CodedCharSetId and Encoding fields in the MsgDesc parameter indicate the character set and encoding of the character and integer data in the MQXQH structure, respectively. The character set and encoding of the application message data are defined by the CodedCharSetId and Encoding fields in the embedded message descriptor.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzak10233 |