PL/SQL Packages and Types Reference 10g Release 1 (10.1) Part Number B10802-01 |
|
|
View PDF |
This chapter describes the types used with Oracle Streams Advanced Queuing (AQ) packages for PL/SQL, DBMS_AQ,
and DBMS_AQADM
.
See Also:
Oracle Streams Advanced Queuing User's Guide and Reference for information about using Oracle Streams AQ. |
This chapter contains the following topics:
Identifies a producer or a consumer of a message.
TYPE SYS.AQ$_AGENT IS OBJECT ( name VARCHAR2(30), address VARCHAR2(1024), protocol NUMBER DEFAULT 0);
Attribute | Description |
---|---|
|
Name of a producer or consumer of a message. The name must follow object name guidelines in the Oracle Database SQL Reference with regard to reserved characters. |
|
Protocol-specific address of the recipient. If the protocol is For example, a queue named |
|
Protocol to interpret the address and propagate the message. Protocols 1-127 are reserved for internal use. If the protocol number is in the range 128 - 255, the address of the recipient is not interpreted by Oracle Streams AQ. |
Identifies the list of agents for which DBMS_AQ
.LISTEN
listens.
TYPE SYS.AQ$_AGENT_LIST_T IS TABLE OF SYS.AQ$_AGENT INDEX BY BINARY INTEGER;
Specifies the Oracle Streams AQ descriptor received by the AQ PL/SQL callbacks upon notification.
TYPE SYS.AQ$_DESCRIPTOR IS OBJECT ( queue_name VARCHAR2(61), consumer_name VARCHAR2(30), msg_id RAW(16), msg_prop MSG_PROP_T);
Specifies anonymous subscriptions to which you want to post messages.
TYPE SYS.AQ$_POST_INFO IS OBJECT ( name VARCHAR2(128), namespace NUMBER, payload RAW(2000) DEFAULT NULL);
Identifies the list of anonymous subscriptions to which you want to post messages.
TYPE SYS.AQ$_POST_INFO_LIST AS VARRAY(1024) OF SYS.AQ$_POST_INFO;
Specifies the options available for purging a queue table.
TYPE AQ$_PURGE_OPTIONS_T is RECORD (block boolean DEFAULT FALSE);
If block
is TRUE
, then an exclusive lock on all the queues in the queue table is held while purging the queue table. This will cause concurrent enqueuers and dequeuers to block while the queue table is purged. The purge call always succeeds if block
is TRUE
.
The default for block
is FALSE
. This will not block enqueuers and dequeuers, but it can cause the purge to fail with an error during high concurrency times.
Identifies the list of agents that receive the message. This type can be used only when the queue is enabled for multiple dequeues.
TYPE SYS.AQ$_RECIPIENT_LIST_T IS TABLE OF SYS.AQ$_AGENT INDEX BY BINARY_INTEGER;
Specifies the information regarding the registrant for notification on a queue.
TYPE SYS.AQ$_REG_INFO IS OBJECT ( name VARCHAR2(128), namespace NUMBER, callback VARCHAR2(4000), context RAW(2000) DEFAULT NULL);
You can use the following notification mechanisms:
Table 171-5 shows the actions performed for nonpersistent queues for different notification mechanisms when RAW presentation is specified. Table 171-6 shows the actions performed when XML presentation is specified.
Identifies the list of registrations to a queue.
TYPE SYS.AQ$_REG_INFO_LIST AS VARRAY(1024) OF SYS.AQ$_REG_INFO;
Identifies the list of subscribers that subscribe to a queue.
TYPE SYS.AQ$_SUBSCRIBER_LIST_T IS TABLE OF SYS.AQ$_AGENT INDEX BY BINARY_INTEGER;
Specifies the options available for the dequeue operation.
TYPE DEQUEUE_OPTIONS_T IS RECORD ( consumer_name VARCHAR2(30) DEFAULT NULL, dequeue_mode BINARY_INTEGER DEFAULT REMOVE, navigation BINARY_INTEGER DEFAULT NEXT_MESSAGE, visibility BINARY_INTEGER DEFAULT ON_COMMIT, wait BINARY_INTEGER DEFAULT FOREVER, msgid RAW(16) DEFAULT NULL, correlation VARCHAR2(128) DEFAULT NULL, deq_condition VARCHAR2(4000) DEFAULT NULL, transformation VARCHAR2(61) DEFAULT NULL);
Specifies the options available for the enqueue operation.
TYPE SYS.ENQUEUE_OPTIONS_T IS RECORD ( visibility BINARY_INTEGER DEFAULT ON_COMMIT, relative_msgid RAW(16) DEFAULT NULL, sequence_deviation BINARY_INTEGER DEFAULT NULL, transformation VARCHAR2(61) DEFAULT NULL);
Describes the information that AQ uses to manage individual messages. These are set at enqueue time, and their values are returned at dequeue time.
TYPE message_properties_t IS RECORD ( priority BINARY_INTEGER DEFAULT 1, delay BINARY_INTEGER DEFAULT NO_DELAY, expiration BINARY_INTEGER DEFAULT NEVER, correlation VARCHAR2(128) DEFAULT NULL, attempts BINARY_INTEGER, recipient_list AQ$_RECIPIENT_LIST_T, exception_queue VARCHAR2(61) DEFAULT NULL, enqueue_time DATE, state BINARY_INTEGER, sender_id sys.aq$_agent DEFAULT NULL, original_msgid RAW(16) DEFAULT NULL, transaction_group VARCHAR2(30) DEFAULT NULL, user_property SYS.ANYDATA DEFAULT NULL);
Attribute | Description |
---|---|
|
Specifies the priority of the message. A smaller number indicates higher priority. The priority can be any number, including negative numbers. |
|
Specifies the delay of the enqueued message. The delay represents the number of seconds after which a message is available for dequeuing. Dequeuing by
number: The number of seconds to delay the message |
|
Specifies the expiration of the message. It determines, in seconds, the duration the message is available for dequeuing. This parameter is an offset from the time the message is ready for dequeue. Expiration processing requires the queue monitor to be running. However the queue monitor is started automatically by the system if needed.
number: The number of seconds message remains in |
|
Returns the identifier supplied by the producer of the message at enqueue time. |
|
Returns the number of attempts that have been made to dequeue the message. This parameter cannot be set at enqueue time. |
|
This parameter is only valid for queues that allow multiple consumers. The default recipients are the queue subscribers. This parameter is not returned to a consumer at dequeue time. For type definition, see the "AQ$_AGENT Type". |
|
Specifies the name of the queue into which the message is moved if it cannot be processed successfully. Messages are moved automatically into the exception queue. Messages are moved into the exception queue in the following cases:
The default is the exception queue associated with the queue table. If the exception queue specified does not exist at the time of the move, then the message is moved to the default exception queue associated with the queue table, and a warning is logged in the alert file. If the default exception queue is specified, then the parameter returns a |
|
Specifies the time the message was enqueued. This value is determined by the system and cannot be set by the user at enqueue time. |
|
Specifies the state of the message at the time of the dequeue. This parameter cannot be set at enqueue time. The possible states follow: |
|
The application-sender identification specified at enqueue time by the message producer. Sender id is of type Sender name is required for secure queues at enqueue time. This must be a valid AQ agent name, mapped to the database user performing the enqueue operation, through The Sender id in the message properties returned at dequeue time may have a sender address if the message was propagated from another queue. The value of the address is the |
|
This parameter is used by Oracle Streams AQ for propagating messages. |
|
Specifies the |
|
This optional attribute is used to store additional information about the payload. |
This type is used by dbms_aq.enqueue_array
and dbms_aq.dequeue_array
calls to hold the set of message properties. Each element in the payload_array
should have a corresponding element in the MESSAGE_PROPERTIES_ARRAY_T
VARRAY
.
TYPE MESSAGE_PROPERTIES_ARRAY_T IS VARRAY (2147483647) OF MESSAGE_PROPERTIES_T;
The msgid_array_t
type is used in dbms_aq.enqueue_array
and dbms_aq.dequeue_array
calls to hold the set of message IDs that correspond to the enqueued or dequeued messages.
TYPE MSGID_ARRAY_T IS TABLE OF RAW(16) INDEX BY BINARY_INTEGER