Prior to Oracle, you could queue messages for later retrieval and execution within a single database instance.
The Oracle queue functionality did not work across a database link to a distributed database.
Now, with Oracle, you can use Advanced Queuing (AQ) message propagation to enqueue to a remote queue at a remote database. In addition, you can use the scheduling feature to specify the start time and the propagation window.
This lesson focus i'ss on the preliminary steps necessary to enable users and a database to use Advanced Queuing.
Review the Slide Show below to see how this works.
Advanced Queuing (AQ): A utility to store transactions in a queue, distribute the queue to other databases, and then retrieve and run the queued transactions.
Preparing to use Advanced Queuing in Oracle
All the 8.1 privileges needed for working with queues must be granted by an AQ administrator using the DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE package. SYS and SYSTEM are initially given the
AQ ADMINISTRATOR role and can grant that role to other users. The AQ_USER_ROLE is only for 8.0 compatible queues. This role is ignored by 8.1 compatible queues.
The next lesson discusses connection pooling.
Steps For Setting Up Advanced Queuing
Click the link below to learn more about Advanced Queuing in Oracle.
Steps For Setting Up Advanced Queuing
Changes in Oracle Database Advanced Queuing 12c Release 1 (12.1.0.2)
The following are changes in Oracle Database Advanced Queuing User's Guide for Oracle Database 12c Release 1 (12.1.0.2).
New Features
The following feature is new in this release:
JMS Streaming
In Oracle Database 12c Release 1 (12.1.0.2), Advanced Queuing introduces JMS Streaming with enqueue and dequeue for sharded queues through AQjmsBytesMessage and AQjmsStreamMessage, for the applications interested in sending and receiving large message data or payload.
Changes in Oracle Database Advanced Queuing 12c Release 1 (12.1)
The following are changes in Oracle Database Advanced Queuing User's Guide for Oracle Database 12c Release 1 (12.1).
New Features
The following features are new in this release:
JMS Sharded Queues
In Oracle Database 12c Release 1 (12.1), Advanced Queuing introduces high performing and scalable sharded JMS Queues. A sharded queue is a single logical queue that is divided into multiple, independent, physical queues through system-maintained partitioning. A sharded queue increases enqueue-dequeue throughput, especially across Oracle RAC instances, because ordering between two messages on different queue shards is best effort.
Each shard is ordered based on enqueue time within a session. Sharded queues automatically manage table partitions so that enqueuers and dequeuers do not contend among themselves. In addition, sharded queues use an in-memory message cache to optimize performance and reduce the disk and CPU overhead of AQ-JMS enqueues and dequeues. Sharded queues are the preferred JMS queues for queues used across Oracle RAC instances, for queues with high enqueue or dequeue rates, or for queues with many subscribers.
Result Cache Enhancement
In Oracle Database 12c Release 1 (12.1), the Rules Engine introduces a result cache to improve the performance of many commonly used rules. The result cache will bypass the evaluation phase if an expression with the same attributes has already been evaluated earlier. Not all rule results are cached, such as when rule results are potentially non-deterministic or when not all rules are evaluated or when attributes include non-scalar data types.
For Advanced Queues, the cache is most useful when subscriptions and their dequeue sessions are long-lived.
Steps to take before setting up Advanced Queuing
Set JOB_QUEUE_PROCESSES to at least 2.
Grant EXECUTE on DBMS_AQADM to a user.
Create a new queue in the database.
Grant ENQUEUE ANY QUEUE and DEQUEUE ANY QUEUE to other users.