Overview for MQSD
Availability: The MQSD structure is available on the following platforms:
- AIX
- IBM i
- Linux
- Windows
- z/OS
and for IBM MQ MQI clients connected to these systems.
Purpose: The MQSD structure is used to specify details about the subscription being made.
The structure is an input/output parameter on the MQSUB call. For more information, see MQSUB usage notes.
Managed subscriptions: If an application has no specific need to use a particular queue as the destination for those publications that match its subscription, it can use the managed subscription feature. If an application elects to use a managed subscription, the queue manager informs the subscriber about the destination where published messages are sent, by providing an object handle as an output from the MQSUB call. For more information, see Hobj (MQHOBJ) - input/output.
When the subscription is removed, the queue manager also undertakes to clean up messages that have not been retrieved from the managed destination, in the following situations:- When the subscription is removed - by use of MQCLOSE with MQCO_REMOVE_SUB - and the managed Hobj is closed.
- By implicit means when the connection is lost to an application using a non-durable subscription (MQSO_NON_DURABLE)
- By expiration when a subscription is removed because it has expired and the managed Hobj is closed.
We must use managed subscriptions with non-durable subscriptions, so that this clean up can occur, and so that messages for closed non-durable subscriptions do not take up space in your queue manager. Durable subscriptions can also use managed destinations.
Version: The current version of MQSD is MQSD_VERSION_1.
Character set and encoding: Data in MQSD must be in the character set given by the CodedCharSetId queue manager attribute and encoding of the local queue manager given by MQENC_NATIVE. However, if the application is running as an MQ MQI client, the structure must be in the character set and encoding of the client.
Parent topic: MQSD - Subscription descriptor