MQPBC - Publication context data structure
The MQPBC structure contains the contextual information, relating to the publisher of the publication, that is passed to the publish exit.
Table 1 summarizes the fields in the structure:
| Field | Description |
|---|---|
StrucID |
Structure identifier |
Version |
Structure version number |
PubTopicString |
Publish topic string |
MsgDescPtr |
Address of message descriptor (MQMD) |
Fields
StrucID(MQCHAR4)StrucIDis the structure identifier. The value is as follows:MQPBC_STRUCIDMQPBC_STRUCIDis the identifier for the publication context structure. For the C programming language, the constantMQPBC_STRUC_ID_ARRAYis also defined; it has the same value asMQPBC_STRUC_ID, but is an array of characters instead of a string.
StrucIDis an input field to the exit.Version(MQLONG)Versionis the structure version number. The value is as follows:MQPBC_VERSION_1MQPBC_VERSION_1is the Version 1 publish exit parameter structure.MQPBC_VERSION_2MQPBC_VERSION_2is the Version 2 publish exit parameter structure. The constantMQPBC_CURRENT_VERSIONis also defined with the same value.
Versionis an input field to the exit.PubTopicString(MQCHARV)PubTopicStringis the topic string being published to.PubTopicStringis an input field to the exit.MsgDescPtr(PMQMD)MsgDescPtris the address of a copy of the message descriptor (MQMD) for the message being processed.MsgDescPtris an input field to the exit.
C language declaration - MQPBC
typedef struct tagMQPBC {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQCHARV PubTopicString; /* Publish topic string */
PMQMD MsgDescPtr; /* Address of message descriptor */
} MQPBC;