Unsubscribing from a Topic

This real-time data function allows you to unsubscribe from a topic that has been broadcasting messages. Unsubscribing from a topic follows a one-to-many model rather than a one-to-one model (as in receiving a message). To unsubscribe from a topic, you must have TIBCO JMS and Adaptive Server Enterprise connection profiles running with Real Time Messaging configured. A subscription from which to unsubscribe must be available. In addition, there must be topics from which you can unsubscribe and registered subscription(s) for those topics.

To unsubscribe from a topic:

  1. In Database Explorer under the ASE Connection profile, expand the Procedures and Functions folder; or for triggers, expand the Tables folder, then the appropriate table, and finally the Triggers folder.

  2. Select the procedure or trigger that you want to unsubscribe from a topic. Right-click and select Edit Procedure or Edit Trigger. The procedure or trigger code appears in SQL Editor.

  3. Place the cursor in the desired location within the SQL code, right-click and select Real-time Messaging Wizard. You can also open the wizard from the ASE Real-Time Messaging Wizard icon on the toolbar. The Select a Wizard dialog appears. If Unsubscribe from a Topic is not visible, expand the Real-time Data Functions|Topic-related Functions folders first.

  4. Select Unsubscribe from a Topic. The Specify Subscription dialog appears.

  5. In Subscription Name, select the subscription name associated with the topic from which you want to unsubscribe. The read-only fields in the Subscription Information box are automatically populated.

  6. Use Retain the Durable Subscriber to indicate whether or not you want to continue to subscribe to any durable subscription. The default is Yes.

  7. Click Finish. The messaging construct appears in SQL Editor.

    Note

    Because ASE messaging constructs are functions, select appears before the messaging construct. You can assign the messaging function to a local variable that has already been declared.

Registering a Subscription

Subscribing to a Topic

Creating an ASE Connection Profile

Creating a JMS Connection Profile

Real-Time Messaging Services

See the Adaptive Server Enterprise Messaging Services User's Guide for Real-Time Data Services.

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com