msgrecv  msgpublish

Chapter 5: Real Time Data Functions

msgsubscribe and msgunsubscribe

Description

Provides a SQL interface to subscribe or unsubscribe to a topic.

Syntax

 msg_subscribe::= msgsubscribe (subscription_name)
 msg_unsubscribe::=msgunsubscribe 
     (subscription_name [with {remove | retain}])
 subscription_name::=basic_character_expression

Parameters

subscription_name

The name of the subscription to which you are subscribing. A basic_character_expression.

with{remove | retain}

Removes or retains the durable subscription from the JMS message provider.

Examples

Example 1

Tells the JMS messaging provider to begin holding messages published to the topic registered as “subscription_1”:

select msgsubscribe (’subscription_1’)

Example 2

Tells the JMS messaging provider to stop holding messages published to the topic registered as “subscription_1”:

select msgunsubscribe(’subscription_1’)

Usage





Copyright © 2004. Sybase Inc. All rights reserved. msgpublish

View this book as PDF