MQSBC - Subscription context data structure
The MQSBC structure contains the contextual information, relating to the subscriber that is receiving the publication, that is passed to the publish exit.
| Field | Description |
|---|---|
StrucID |
Structure identifier |
Version |
Structure version number |
DestinationQMgrName |
Name of destination queue manager |
DestinationQName |
Name of destination queue |
SubType |
Type of subscription |
SubOptions |
Subscription options |
ObjectName |
Object name |
ObjectString |
Object string |
SubTopicString |
Subscription topic string |
SubName |
Subscription name |
SubId |
Subscription identifier |
SelectionString |
Address of selection string |
SubLevel |
Subscription level |
PSProperties |
Publish/subscribe properties |
Fields
StrucID(MQCHAR4)- Structure identifier. The value is as follows:
MQSBC_STRUCIDMQSBC_STRUCIDis the identifier for the publish exit parameter structure. For the C programming language, the constantMQSBC_STRUC_ID_ARRAYis also defined;MQSBC_STRUC_ID_ARRAYhas the same value asMQSBC_STRUC_ID, but is an array of characters instead of a string.
StrucIDis an input field to the exit. Version(MQLONG)- Structure version number. The value is as follows:
MQSBC_VERSION_1- Version 1 publish exit parameter structure. The constant
MQSBC_CURRENT_VERSIONis also defined with the same value.
Versionis an input field to the exit. DestinationQMgrName(MQCHAR48)DestinationQMgrNameis the name of the queue manager to which the message is being sent. The name is padded with blanks to the full length of the field. The name can be altered by the exit. The length of this field is given byMQ_Q_MGR_NAME_LENGTH.DestinationQMgrNameis an input/output field to the exit; see note.DestinationQName(MQCHAR48)DestinationQNameis the name of the queue to which the message is being sent. The name is padded with blanks to the full length of the field. The name can be altered by the exit. The length of this field is given byMQ_Q_NAME_LENGTH.DestinationQNameis an input/output field to the exit; see note.SubType(MQLONG)- SubType indicates how the subscription was created. Valid values are
MQSUBTYPE_API,MQSUBTYPE_ADMINandMQSUBTYPE_PROXY; see Inquire Subscription Status (Response).SubTypeis an input field to the exit. SubOptions(MQLONG)SubOptionsare the subscription options; see Options (MQLONG) for a description of values this field can take.SubOptionsis an input field to the exit.ObjectName(MQCHAR48)ObjectNameis the name of the topic object as defined on the local queue manager. The length of this field is given byMQ_TOPIC_NAME_LENGTH. The object name is the name of the administrative topic object that the queue manager has associated with the topic string. Even if the subscriber provided a topic object as part of the subscription, theObjectNamemight be a different topic object. The association of a topic object with a subscription depends upon the full resolution ofSubTopicString.ObjectNameis an input field to the exit.ObjectString(MQCHARV)ObjectStringis the full topic string of the publication that was subscribed to. Any wildcards in the original subscription string are resolved. It is different to theMQSDsubscriptionObjectStringfield described in ObjectString (MQCHARV), which might contain wildcards, and is exclusive of any object name provided by the subscriber.ObjectStringis an input field to the exit.SubTopicString(MQCHARV)SubTopicStringis the complete topic string as supplied by the subscriber.SubTopicStringis the combination of the topic string defined in a topic object, and a topic string. A subscriber must provide either a topic object, a topic string, or both. If the subscriber provides a topic string, it might contain wildcards.SubTopicStringis an input field to the exit.SubName(MQCHARV)SubNameis the subscription name that is provided either by the subscriber, or is a generated name.SubNameis an input field to the exit.SubId(MQBYTE 24)SubIdis the unique internal subscription identifier.SubIdis an input field to the exit.SelectionString(MQCHARV)SelectionStringis the selection criteria used when subscribing for messages from a topic; see Selectors.SelectionStringis an input field to the exit.SubLevel(MQLONG)SubLevelis the interception level associated with the subscription; see SubLevel (MQLONG) for further details.SubLevelis an input field to the exit.PSProperties(MQLONG)PSPropertiesare the publish/subscribe properties. They specify how publish/subscribe related message properties are added to messages sent to this subscription. Possible values areMQPSPROP_NONE,MQPSPROP_COMPAT,MQPSPROP_RFH2,MQPSPROP_MSGPROP. See Optional parameters (Change, Copy, and Create Subscription) for a description of these values.PSPropertiesis an input field to the exit.
DestinationQMgrName and DestinationQName before they are passed to the publish exit. No new authorization checks are performed when the exit changes the destination queue, either by changing DestinationQMgrName or DestinationQName.
C language declaration - MQSBC
typedef struct tagMQSBC {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQCHAR48 DestinationQMgrName; /* Destination queue manager */
MQCHAR48 DestinationQName; /* Destination queue name */
MQLONG SubType; /* Type of subscription */
MQLONG SubOptions; /* Subscription options */
MQCHAR48 ObjectName; /* Object name */
MQCHARV ObjectString; /* Object string */
MQCHARV SubTopicString; /* Subscription topic string */
MQCHARV SubName; /* Subscription name */
MQBYTE24 SubId; /* Subscription identifier */
MQCHARV SelectionString; /* Subscription selection string */
MQLONG SubLevel; /* Subscription level */
MQLONG PSProperties; /* Publish/subscribe properties */
} MQSBC;