Subscribing to a Topic

Sybase WorkSpace allows messaging constructs to receive messages from a published topic to which it subscribes in a JMS queue. Unlike sending and receiving a message, any authorized user can subscribe to a topic that has been published.

For a messaging construct to subscribe to a topic from a JMS queue, you must have both TIBCO JMS and Adaptive Server Enterprise connection profiles running with Real-Time Messaging configured. A topic must be available in the TIBCO JMS server to serve as an endpoint, or destination, for the subscription.

  1. For the appropriate ASE connection profile and database, select the appropriate procedural object.
    Object How to select
    Stored procedure Expand the Stored Procedures folder, right-click the stored procedure, and select Edit.
    Trigger Expand the Tables folder, expand the table, and then expand the Triggers folder. Right-click the trigger and select Edit.
  2. In the Source page, 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 theReal-Time Messaging Wizard icon ASE Real-Time Messaging Wizard icon on the toolbar.

  3. If the Subscribe to a Topic function is not visible, expand the Real-Time Data Functions > Topic-Related Functions folders first.
  4. Select Subscribe to a Topic and click Next.
  5. Select a Subscription Name.

    Read-only information about the subscription appears in the Subscription Information box. The Preview box displays the SQL code that the subscription generates.

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

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

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
Consuming a Message from a Topic
Unsubscribing from a Topic
Registering a Subscription
Parsing an XML Document
Retrieving XML Message Properties
Related reference
Select for XML Statements


Created June 25, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com