8 TECHNICAL BRIEF | Oracle Database 19c: Advanced Queuing
Message Propagation
AQ can propagate messages from one queue to another queue in the same database or in a remote database. This allows applications
to communicate asynchronously with each other in a distributed environment without being connected to the same database or to the
same queue. The source queue is a multi-consumer queue while the target queue can be either a single-consumer or multi-consumer
queue. Messages enqueued in the source queue are propagated automatically and are available for dequeuing at the destination
queue or queues. Propagation can be set up to run either continuously as a background process or run only if there is a message to be
propagated. With queue-to-queue propagation, a separate job is created to propagate messages for each source and destination
queue pair. With queue to dblink propagation, propagation to all target queues at a dblink will share the same propagation job.
Message Transformation
Most business-to-business (B2B) applications need to manipulate data in different formats to integrate disparate applications and
systems. AQ provides a complete data transformation engine to transform messages from one data type to another. AQ supports
message transformations between different Oracle and user-defined data types. These transformations can be SQL expressions,
PL/SQL functions or Java stored procedures. AQ also supports transformations of XML documents using XSLT.
Transformations change the format of a message, so that a message created by one application can be understood by another
application. AQ message transformations can be automatically applied to messages during enqueuing, dequeuing or subscribing to
queues. A single transformation must be specified when enqueuing or dequeuing a message, irrespective of the number of the
recipients of the message. In the case of remote subscriptions, a single transformation must be specified for all messages sent to a
particular queue at the destination. Message transformations can be applied to both persistent and nonpersistent messages.
Transformations are exported with a schema or a full database export. If an AQ table is exported, the transformations corresponding to
the queue table will also be exported.
Rules-based Message Routing
AQ can intelligently route messages to the right subscribers in a multi-consumer queue or propagate messages to the right queues
based on rules specified by each application. The rules can be defined on message properties, message data content, or both. Similar
in syntax to the WHERE clause of a SQL query, rules can be expressed in terms of attributes that represent message properties or
message content. The rules engine supports faster evaluation of many SQL-92 expressions such as BITAND , CEIL, FLOOR ,
LENGTH, POWER, CONCAT, LOWER, UPPER, LENGTH, INSTR, SYS_CONTEXT, and UID.
AQ Deployments
AQ is a popular infrastructure for building enterprise messaging functionality across many industries. AQ has been used for simple
scalable workflows, messaging hubs, asynchronous processing, information integration, application integration, messaging warehouse,
alerts, and message-based logical replication. The following provides examples of AQ deployments.
A leading online retailer integrated its CRM system that was hosted by a third party provider with its backend Order processing system
using AQ’s robust and reliable database-integrated messaging infrastructure. Customer and order data were synchronized in near real-
time between the two systems in geographically distributed sites. Message persistence with AQ allowed the two systems to send and
receive data changes through persistent queues. This asynchronous message passing de-coupled the two systems and allowed the
online store to be available to customers to collect orders even if the order-processing site was down. With AQ, the company leveraged
the reliability and scalability of the Oracle Database to handle peak traffic during holiday seasons and developed the integration in a
matter of weeks using AQ’s standards based interfaces.
A European financial services firm implemented AQ as the core platform to integrate the firm’s global IT infrastructure. Enterprise
messaging provided by AQ was used to connect the hubs in London, New York, Singapore, Hong Kong and Tokyo. The core
applications in the hubs exchange financial transactions and other information through XML messages. Due to the sensitive nature of