Oracle AQ Nonprogram Elements

Oracle AQ defines a number of data structures, exceptions, and other nonprogram elements you’ll use when creating and manipulating queues. In addition, there are several data structures you will create and pass to Oracle AQ programs. In many cases, you will find yourself creating and manipulating objects, index-by tables (formerly known as PL/SQL tables), and records. If you are not familiar with these programming constructs, you should review the appropriate chapters in the second edition of Oracle PL/SQL Programming.

Constants

Oracle AQ predefines a set of constants that you then use in various calls to procedures and functions. The following two lists break out these constants into those that are used for administrative tasks and those that figure into operational actions. In both cases, I intentionally do not show the values assigned to these constants. You should never hard-code those values into your code. Instead, always rely on the constants.

Administrative tasks

When you are performing administrative tasks in AQ (such as creating queue tables and queues), you may need to use one of the following constants:

Task

Constant

Specify the type of payload

DBMS_AQADM.OBJECT_TYPE_PAYLOAD

DBMS_AQADM.RAW_TYPE

Enable or disable a queue for multiple consumers

DBMS_AQADM.SINGLE

DBMS_AQADM.MULTIPLE

Request that messages on a queue never expire

DBMS_AQADM.INFINITE

Specify type of message grouping for a queue table

DBMS_AQADM.TRANSACTIONAL

DBMS_AQADM.NONE ...

Get Oracle Built-in Packages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.