UNREGISTER v13

Use the UNREGISTER procedure to turn off notifications related to enqueueing and dequeueing. The signature is:

UNREGISTER(
  <reg_list> IN SYS.AQ$_REG_INFO_LIST,
  <count> IN NUMBER)

Parameter

reg_list

reg_list is a list of type AQ$_REG_INFO_LIST; that provides information about each subscription that you would like to register. Each entry within the list is of the type AQ$_REG_INFO, and may contain:

AttributeTypeDescription
nameVARCHAR2 (128)The (optionally schema-qualified) name of the subscription.
namespaceNUMERICThe only supported value is DBMS_AQ.NAMESPACE_AQ (0)
callbackVARCHAR2 (4000)Describes the action that will be performed upon notification. Currently, only calls to PL/SQL procedures are supported. The call should take the form:

plsql://schema.procedure

Where:

schema specifies the schema in which the procedure resides.

procedure specifies the name of the procedure that will be notified.
contextRAW (16)Any user-defined value required by the procedure.

count

count is the number of entries in reg_list.

Example

The following anonymous block calls DBMS_AQ.UNREGISTER, disabling the notifications specified in the example for DBMS_AQ.REGISTER:

DECLARE
   subscription1 sys.aq$_reg_info;
   subscription2 sys.aq$_reg_info;
   subscription3 sys.aq$_reg_info;
   subscriptionlist sys.aq$_reg_info_list;
BEGIN
   subscription1 := sys.aq$_reg_info('q', DBMS_AQ.NAMESPACE_AQ,
'plsql://assign_worker?PR=0',HEXTORAW('FFFF'));
   subscription2 := sys.aq$_reg_info('q', DBMS_AQ.NAMESPACE_AQ,
'plsql://add_to_history?PR=1',HEXTORAW('FFFF'));
   subscription3 := sys.aq$_reg_info('q', DBMS_AQ.NAMESPACE_AQ,
'plsql://reserve_parts?PR=2',HEXTORAW('FFFF'));

   subscriptionlist := sys.aq$_reg_info_list(subscription1,
subscription2, subscription3);
   dbms_aq.unregister(subscriptionlist, 3);
   commit;
  END;
   /

The subscriptionlist is of type sys.aq$_reg_info_list, and contains the previously described sys.aq$_reg_info objects. The list name and an object count are passed to dbms_aq.unregister.