Sybase WorkSpace enables you to create the SQL code for publishing
a message to a topic. You can build a messaging construct that broadcasts
messages to multiple subscribes rather than sending it to a single
endpoint. It follows a one-to-many model rather than a
one-to-one model of real-time messaging.
Prerequisites
To publish a message to a
topic, you must have connection profiles for TIBCO JMS and
Adaptive Server Enterprise running with real-time messaging configured. A
subscription must be available in the JMS server to serve
as an endpoint. In addition, you must have topics to which you can subscribe
and have registered a subscription for those topics. See the TIBCO
documentation for information on creating a topic in JMS.
- 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. |
-
In the Source page, place the cursor in the desired location within the SQL code, right-click and select
.
You can also open the wizard from the
ASE Real-Time Messaging Wizard icon on the toolbar.
-
Select
, and click
Next.
-
Select the
Subscription Name associated with the topic to which you want to publish a message.
-
Click
Next.
-
In the
Specify Message Body dialog, select one of the
following:
Option |
Action |
Variable
|
Select a local variable or parameter before the
current cursor position. The selected variable or parameter becomes the message body in the current stored
procedural object definition.
|
Text |
Enter the message text, or use Browse to locate
a text file for the message body.
|
Bytes |
Enter the message body in hexadecimal format. You can also
use Browse to locate a hexadecimal file that you can copy into the
message body.
|
Select Statement |
Select SQL... to invoke the Visual SQL dialog.
|
-
Click
Next to specify message options.
Tab |
Description |
Options |
Contains the default JMS options:
|
Properties |
Customize JMS
system properties: mode, priority, correlation, reply queue, reply topic, and
time-to-live. Sybase provides default values that you can change. The Correlation field remains dimmed
unless you select it.
|
User-Defined Properties |
- Click Add.
- Enter the name and
value of the property you want to add.
- (Optional) Select String
Type.
- Click OK.
|
-
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.
For more infomation, see the Adaptive Server Enterprise
Messaging Services User's Guide for Real-Time Data
Services.