One or more subscriptions for a particular subscriber can be deregistered using the Deregister Subscriber command message. This is sent to the broker control queue, SYSTEM.BROKER.CONTROL.QUEUE. The message must be sent by the subscriber that registered the subscription in the first place.
There are other ways in which a subscription can be deregistered; these are listed below.
When a subscriber application sends a message to deregister a subscription, and receives a response message to say that this has been done successfully, some publications might subsequently reach the subscriber queue if they were being processed by the broker at the same time as the deregistration. This might result in a buildup of unprocessed messages on the subscriber queue. The application can clear these unprocessed messages from the queue by repeatedly sleeping and sending an MQGET call with the appropriate CorrelId.
Similarly, if the subscriber uses a permanent dynamic queue and, when terminating, it deregisters and closes the queue with the PurgeandDelete option, the queue might not be empty. This is because publications from the broker might not yet be committed at the time that the queue was deleted. In this case, a Q_NOT_EMPTY return code is issued by the MQCLOSE call. The application can avoid this problem by repeatedly sleeping and reissuing the MQCLOSE call.
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
aq13060_ |