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:
Table 1. Fields in MQPBC
Field Description
StrucID Structure identifier
Version Structure version number
PubTopicString Publish topic string
MsgDescPtr Address of message descriptor (MQMD)


Fields

    StrucID (MQCHAR4)
    StrucID is the structure identifier. The value is as follows:

      MQPBC_STRUCID
      MQPBC_STRUCID is the identifier for the publication context structure. For the C programming language, the constant MQPBC_STRUC_ID_ARRAY is also defined; it has the same value as MQPBC_STRUC_ID, but is an array of characters instead of a string.

    StrucID is an input field to the exit.

    Version (MQLONG)
    Version is the structure version number. The value is as follows:

      MQPBC_VERSION_1
      MQPBC_VERSION_1 is the Version 1 publish exit parameter structure.

      MQPBC_VERSION_2
      MQPBC_VERSION_2 is the Version 2 publish exit parameter structure. The constant MQPBC_CURRENT_VERSION is also defined with the same value.

    Version is an input field to the exit.

    PubTopicString (MQCHARV)
    PubTopicString is the topic string being published to.

    PubTopicString is an input field to the exit.

    MsgDescPtr (PMQMD)
    MsgDescPtr is the address of a copy of the message descriptor (MQMD) for the message being processed.

    MsgDescPtr is 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;