+

Search Tips | Advanced Search

Delete Publication message

The Delete Publication command message is sent to a queue manager from a publisher, or from another queue manager, to tell the queue manager to delete any retained publications for the specified topics.

This message is sent to a queue monitored by the queue manager's queued publish/subscribe interface.

The input queue should be the queue that the original publication was sent to.

If we have the authority for some, but not all, of the topics that are specified in the Delete Publication command message, only those topics are deleted. A Broker Response message indicates which topics are not deleted.

Similarly, if a Publish command contains more than one topic, a Delete Publication command matching some, but not all, of those topics deletes only the publications for the topics that are specified in the Delete Publication command.

See MQMD settings for publications forwarded by a queue manager for details of the message descriptor (MQMD) parameters that are needed when sending a command message to the queue manager.

Parent topic: Queued publish/subscribe command messages


Properties

    Command (MQPSC_COMMAND)
    The value is DeletePub (MQPSC_DELETE_PUBLICATION).

    This property must be specified.

    Topic> (MQPSC_TOPIC)
    The value is a string that contains a topic for which retained publications are to be deleted. Wildcard characters can be included in the string to delete publications on more than one topic.

    This property must be specified; it can be repeated for as many topics as needed.

    DelOpt (MQPSC_DELETE_OPTION)
    The delete options property can take one of the following values:

      Local (MQPSC_LOCAL)  

      All retained publications for the specified topics are deleted at the local queue manager (that is, the queue manager to which this message is sent), whether they were published with the Local option or not.

      Publications at other queue managers are not affected.

      None (MQPSC_NONE)  

      All options take their default values. This has the same effect as omitting the DelOpt property. If other options are specified at the same time, None is ignored.

    The default if this property is omitted is that all retained publications for the specified topics are deleted at all queue managers in the network, regardless of whether they were published with the Local option.


Example

Here is an example of NameValueData for a Delete Publication command message. This is used by the sample application to delete, at the local queue manager, the retained publication that contains the latest score in the match between Team1 and Team2.
 <psc>
   <Command>DeletePub</Command>
   <Topic>Sport/Soccer/State/LatestScore/Team1 Team2</Topic>
   <DelOpt>Local</DelOpt>
 </psc>

Last updated: 2020-10-04