Oracle8i Application Developer's Guide - Advanced Queuing Release 2 (8.1.6) Part Number A76938-01 |
|
Administrative Interface, 18 of 25
Alter existing properties of a subscriber to a specified queue. Only the rule can be altered.
Not applicable.
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Use the following syntax references for each programmatic environment:
See Chapter 3, "AQ Programmatic Environments" for a list of available functions in each programmatic environment. Examples are provided in the following programmatic environments:
/* Add a subscriber with a rule: */ DECLARE subscriber sys.aq$_agent; BEGIN subscriber := sys.aq$_agent('SUBSCRIBER1', 'aq2.msg_queue2@london', null); DBMS_AQADM.ADD_SUBSCRIBER( queue_name => 'aq.msg_queue', subscriber => subscriber, rule => 'priority < 2'); END; /* Change rule for subscriber: */ DECLARE subscriber sys.aq$_agent; BEGIN subscriber := sys.aq$_agent('SUBSCRIBER1', 'aq2.msg_queue2@london', null); DBMS_AQADM.ALTER_SUBSCRIBER( queue_name => 'aq.msg_queue', subscriber => subscriber, rule => 'priority = 1'); END;
/* Alter the rule for a subscriber */ public static void example(AQSession aq_sess) throws AQException { AQQueue queue; AQAgent agent1; AQAgent agent2; /* Get the queue object */ queue = aq_sess.getQueue("AQ", "multi_queue"); /* add a subscriber */ agent1 = new AQAgent("subscriber1", "aq2.msg_queue2@london"); queue.alterSubscriber(agent1, "priority=1"); }
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|