4.6.5.3 Unsubscribing from Notifications
To stop subscribing to event notifications and/or unsolicited
messages, you need to use the JoltUserEvent unsubscribe method. In
Jolt, disabling unsolicited notifications with an unsubscribe
method does not turn off all subscription notifications. This
differs from Oracle Tuxedo. In Oracle Tuxedo the use of
tpsetunsol()
with a NULL handler turns off all
subscription notifications.
When unsubscribing, the following considerations apply:
- If a client is subscribed to a single event, unsubscribing from notification disables both event notification and unsolicited messages.
- If a client has multiple subscriptions, then unsubscribing from any single subscription disables only that single subscription. Unsolicited notifications continue. Only the last subscription to be unsubscribed causes unsolicited notification to stop.
- If a client subscribes to both unsolicited and event notifications, then unsubscribing to only the unsolicited notification will not stop either type of notification from continuing. In addition, this unsubscribe does not throw an exception. However, the Jolt API notes that an unsubscribe has taken place, and a subsequent unsubscribe to the remaining event disables both event notification and unsolicited messages.
If you want to stop unsolicited messages in your client application, you need to make sure that you have unsubscribed to all events.
Parent topic: Oracle Tuxedo Event Subscription