This real-time data function 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.
To register a subscription:
In Database Explorer under the ASE connection profile, expand the Procedures and Functions folder, or for triggers, expand the Tables folder and locate the trigger in the appropriate table.
Select the procedure or trigger that you want register as a subscription. Right-click and select Edit Procedure, Edit Function, or Edit Trigger, depending on the type of object you want to register. The procedure code appears in SQL Editor.
Place the cursor in the desired location within the SQL code, right-click and select ASE
Messaging to invoke the Messaging wizard. You can also open the wizard from the
icon on the toolbar.
The Select a Wizard dialog appears. If the Register a Subscription function is not visible, expand the Real-time Data Functions|Real-time Stored Procedures folders first.
Select Register a Subscription and click Next. The Specify Endpoint dialog appears.
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 Provider 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.
Select the topic name from the Topic drop-down. Select Authenticate and complete the Name and Password fields if you want subscribers to validate their subscriptions. Click Test Connection to verify that the name and password are valid for this connection. The read-only Preview box automatically displays the SQL code generated by your actions.
Click Next. The Specify Subscription Information dialog appears.
Enter a descriptive name in the Subscription Name field.
In the Selector box, enter or select from the Property Name, Operator, Value, and Logical drop-downs any property you want included in the subscription registration. In this way you can limit access to the subscription if the specified criteria are not met.
(Optional) Select Delivery Option to limit messages published to or consumed from a topic to a local or nonlocal subscription. The default is Local. 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.
(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.
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.
Creating an ASE Connection Profile
Creating a JMS Connection Profile
Publishing a Message to a Topic
Consuming a Message from a Topic
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