Work with subscriptions
Use MQSC commands to manage subscriptions.
Subscriptions can be one of three types, defined in the SUBTYPE attribute:
- ADMIN
- Administratively defined by a user.
- PROXY
- An internally created subscription for routing publications between queue managers.
- API
- Created programmatically, for example, using the MQI MQSUB call.
See MQSC commands for detailed information about these commands.
- Defining an administrative subscription
Use the MQSC command DEFINE SUB to create an administrative subscription. We can also use the default defined in the default local subscription definition. Or, we can modify the subscription characteristics from those of the default local subscription, SYSTEM.DEFAULT.SUB that was created when the system was installed. - Display attributes of subscriptions
We can use the DISPLAY SUB command to display configured attributes of any subscription known to the queue manager. - Change local subscription attributes
We can change subscription attributes in two ways, using either the ALTER SUB command or the DEFINE SUB command with the REPLACE attribute. - Copy a local subscription definition
We can copy a subscription definition using the LIKE attribute on the DEFINE command. - Delete a local subscription
We can use the MQSC command DELETE SUB to delete a local subscription. - Check messages on a subscription
When a subscription is defined it is associated with a queue. Published messages matching this subscription are put to this queue.
Parent topic: Work with local IBM MQ objects
Related concepts
- Defining an administrative subscription
- Display attributes of subscriptions
- Change local subscription attributes
- Copy a local subscription definition
- Delete a local subscription