Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_AQADM , 15 of 31


ADD_SUBSCRIBER Procedure

This procedure adds a default subscriber to a queue.

Syntax

DBMS_AQADM.ADD_SUBSCRIBER (
   queue_name     IN    VARCHAR2,
   subscriber     IN    sys.aq$_agent,
   rule           IN    VARCHAR2 DEFAULT NULL,
   transformation IN    VARCHAR2);

Parameters

Table 5-16 ADD_SUBSCRIBER Procedure Parameters
Parameter  Description 
queue_name
 

Name of the queue. 

subscriber
 

Agent on whose behalf the subscription is being defined. 

rule
 

A conditional expression based on the message properties, the message data properties and PL/SQL functions.

A rule is specified as a Boolean expression using syntax similar to the WHERE clause of a SQL query. This Boolean expression can include conditions on message properties, user data properties (object payloads only), and PL/SQL or SQL functions (as specified in the where clause of a SQL query). Currently supported message properties are priority and corrid.

To specify rules on a message payload (object payload), use attributes of the object type in clauses. You must prefix each attribute with tab.user_data as a qualifier to indicate the specific column of the queue table that stores the payload. The rule parameter cannot exceed 4000 characters. 

transformation
 

Specifies a transformation that will be applied when this subscriber dequeues the message. The source type of the transformation must match the type of the queue.

If the subscriber is remote, then the transformation is applied before propagation to the remote queue 

Usage Notes

A program can enqueue messages to a specific list of recipients or to the default list of subscribers. This operation only succeeds on queues that allow multiple consumers. This operation takes effect immediately, and the containing transaction is committed. Enqueue requests that are executed after the completion of this call will reflect the new behavior.

Any string within the rule must be quoted as shown below;

rule   => 'PRIORITY <= 3 AND CORRID =  ''FROM JAPAN'''
 

Note that these are all single quotation marks.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback