The concept behind Advanced Queuing (also known as AQ) is fairly simple. In a normal interaction with an Oracle8
i database, the communication between a user and the database server is
synchronous[1] when a user sends a message to the Oracle server and waits for a response from the server.
Advanced Queuing uses the capabilities of the Oracle server to implement
asynchronous communication. A user sends a message to a queue, where it waits until another user or process takes the message out of the queue.
The sender is not blocked while waiting for a response from the server, as it is with synchronous communication.
The process of communication between the sender and recipient of a message is still guaranteed. The main difference in implementation is that the delivery time is not guaranteed, because it is dependent on when a recipient retrieves a
message as well as when the message is sent.
The following SlideShow illustrates Advanced Queuing at work:
Administration and access privileges for advanced queuing are controled using two roles:
- AQ_ADMINISTRATOR_ROLE - Allows creation and administration of queuing infrastructure.
- AQ_USER_ROLE - Allows access to queues for enqueue and dequeue operations.
In the following examples I have used two schemas, one owning the queuing infrastructure and another with access to it.
For more about when to use Advanced Queuing, click the link below.
When To use Advanced Queuing
In the next lesson, you will learn about the data dictionary views used for Advanced Queuing.