Unsubscribing from a Topic

Use the Real-time Messaging Wizard to unsubscribe from a subscription topic.

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.

  1. From Enterprise Explorer, find the ASE connection profile.
  2. Select the procedural object for which you want to add messaging syntax.
    Procedural Object How to select
    Stored procedure Expand the Stored Procedures folder, right-click the procedure, and select Edit.
    Trigger Expand the Tables folder, expand the table, and then the Triggers folder. Right-click the trigger and select Edit.
  3. Place the cursor in the desired location within the SQL code, right-click and select Sybase_ASE_15.x > Real-time Messaging Wizard .

    You can also open the wizard from the icon on the toolbar.

  4. Select Topic-related Functions > Unsubscribe From a Topic, and click Next.
  5. Select the Subscription Name associated with the topic from which you want to unsubscribe.
  6. Use Retain the Durable Subscriber to indicate whether you want to continue to subscribe to any durable subscription.

    The default is Yes.

  7. Click Finish.
    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.
Related concepts
Real-Time Messaging Services
Mapping Functions
Related tasks
Sending a Message to a JMS Queue
Receiving a Message from a JMS Queue
Sending a Message to a WebSphere MQ Queue
Receiving a Message from a WebSphere MQ Queue
Publishing a Message to a Topic
Subscribing to a Topic
Consuming a Message from a Topic
Registering a Subscription
Parsing an XML Document
Retrieving XML Message Properties
Related reference
Select for XML Statements

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.