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.

Table 1 summarizes the fields in the structure:
Table 1. Fields in MQSBC
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_STRUCID
      MQSBC_STRUCID is the identifier for the publish exit parameter structure. For the C programming language, the constant MQSBC_STRUC_ID_ARRAY is also defined; MQSBC_STRUC_ID_ARRAY has the same value as MQSBC_STRUC_ID, but is an array of characters instead of a string.

    StrucID is 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_VERSION is also defined with the same value.

    Version is an input field to the exit.

    DestinationQMgrName (MQCHAR48)
    DestinationQMgrName is 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 by MQ_Q_MGR_NAME_LENGTH.

    DestinationQMgrName is an input/output field to the exit; see note.

    DestinationQName (MQCHAR48)
    DestinationQName is 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 by MQ_Q_NAME_LENGTH.

    DestinationQName is an input/output field to the exit; see note.

    SubType (MQLONG)
    SubType indicates how the subscription was created. Valid values are MQSUBTYPE_API, MQSUBTYPE_ADMIN and MQSUBTYPE_PROXY ; see Inquire Subscription Status (Response).

    SubType is an input field to the exit.

    SubOptions (MQLONG)
    SubOptions are the subscription options; see Options (MQLONG) for a description of values this field can take.

    SubOptions is an input field to the exit.

    ObjectName (MQCHAR48)
    ObjectName is the name of the topic object as defined on the local queue manager. The length of this field is given by MQ_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, the ObjectName might be a different topic object. The association of a topic object with a subscription depends upon the full resolution of SubTopicString.

    ObjectName is an input field to the exit.

    ObjectString (MQCHARV)
    ObjectString is the full topic string of the publication that was subscribed to. Any wildcards in the original subscription string are resolved. It is different to the MQSD subscription ObjectString field described in ObjectString (MQCHARV), which might contain wildcards, and is exclusive of any object name provided by the subscriber.

    ObjectString is an input field to the exit.

    SubTopicString (MQCHARV)
    SubTopicString is the complete topic string as supplied by the subscriber. SubTopicString is 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.

    SubTopicString is an input field to the exit.

    SubName (MQCHARV)
    SubName is the subscription name that is provided either by the subscriber, or is a generated name.

    SubName is an input field to the exit.

    SubId (MQBYTE 24)
    SubId is the unique internal subscription identifier.

    SubId is an input field to the exit.

    SelectionString (MQCHARV)
    SelectionString is the selection criteria used when subscribing for messages from a topic; see Selectors.

    SelectionString is an input field to the exit.

    SubLevel (MQLONG)
    SubLevel is the interception level associated with the subscription; see SubLevel (MQLONG) for further details.

    SubLevel is an input field to the exit.

    PSProperties (MQLONG)
    PSProperties are the publish/subscribe properties. They specify how publish/subscribe related message properties are added to messages sent to this subscription. Possible values are MQPSPROP_NONE, MQPSPROP_COMPAT, MQPSPROP_RFH2, MQPSPROP_MSGPROP. See Optional parameters (Change, Copy, and Create Subscription) for a description of these values.

    PSProperties is an input field to the exit.

Note: Authorization checks are only performed on the original values of 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;