Registering a Subscription

Sybase WorkSpace allows you to register a messaging construction as a subscription so that you and others can publish to and consume messages from a topic and subscribe to or unsubscribe from a topic.

  1. From Enterprise Explorer, find the ASE connection profile.
  2. Select the procedural object to which you want to register as a subscription.
    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 Real-time Stored Procedures > Register a Subscription, and click Next.
  5. Use the JMS Connection Profile field to select a connection profile.

    Database Development automatically populates the Provider Information fields. If you do not have administrative rights to a JMS connection profile, you must choose a provider from the ASE JMS Provider name drop-down to map the ASE provider to the JMS connection profile. If you cannot make such a mapping, click Create to launch the Create Connection Profile wizard. Follow the instructions for creating a JMS connection profile.

  6. Select the Topic name.
  7. (Optional) Select Authenticate and complete the Name and Password fields if you want subscribers to validate their subscriptions.
  8. (Optional) Click Test Connection to verify that the name and password are valid for this connection.
  9. Click Next.
  10. Enter a descriptive name in the Subscription Name field.
  11. Click Add to add a new selector; use Edit and Delete to edit or delete existing selectors.

    Selectors limit access to the subscription if the specified criteria are not met.

  12. (Optional) Select Delivery Option to limit messages published to or consumed from a topic to a local or nonlocal subscription.

    The default is Local.

    Note: Do not select a delivery option if you want the subscription to be available to both local and nonlocal clients. To remove delivery restrictions, deselect Delivery Option.
  13. (Optional) Select Durable if you want the properties and options to persist for the length of the subscription unless you alter it in the meantime.

    Enter a name in the Durable Name field and an identity for the client in the Client ID field.

  14. Click Finish.
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.
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
Unsubscribing from a Topic
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.