Skip Headers

Oracle® Procedural Gateway and Tools for IBM MQSeries Installation and User's Guide
Release 9.2.0.1.0 for UNIX
Part No. A96196-01
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next

11
Configuring Heterogeneous Outbound Message Propagation

After installing the Heterogeneous Message Propagation option, follow the instructions in this chapter to configure and use the Heterogeneous Outbound Message Propagation option.  Heterogenous Services is a component of the Oracle9i server.  You can also use the Oracle Messaging Gateway, which is included in the RDBMS bundle.

Configuration tasks and other administrative topics include:

Overview of Outbound Message Propagation

Heterogeneous Outbound Message Propagation to MQSeries is accomplished in three steps:

  1. dequeuing the messages from the Oracle AQ source queue

  2. translating the message service properties

  3. enqueuing the messages in the MQSeries destination queue.

After the propagation schedule has started for a source/destination tuple, the propagation process will use the Oracle AQ operational Application Programming Interface (API) to dequeue those messages that have specified a list of recipients or subscribers (if the queue has defined a list of subscribers), or the propagation process will use the Oracle AQ operational API to dequeue all messages from the source queue.

For every message dequeued, the Oracle AQ service properties that are associated with the message are translated (when applicable) to MQSeries properties.  Examples of translated Oracle AQ service properties are queue table, queue, message, and enqueue properties.

After the message service properties are translated, the message is enqueued at the MQSeries destination queue.  The Oracle9i Procedural Gateway for IBM MQSeries provides PL/SQLÔ access to MQSeries.

The outbound message propagation process will call the necessary gateway's procedure calls to perform the following tasks:

Translation of Oracle AQ/IBM MQSeries Interfaces

IBM MQSeries provides a set of services that is comparable to the set of services that is provided by Oracle AQ.  For outbound message propagation, Heterogeneous Message Propagation will provide dynamic, best-effort translations of Oracle AQ interfaces and message service properties into MQSeries properties.  The next section lists the Oracle AQ interfaces, message service properties, and options that applications can specify upon enqueuing a message.  The next section then describes how these items are translated to MQI (the native API for MQSeries applications).

Oracle AQ messages are entered into Oracle AQ queues using the enqueue() procedure (refer to the Oracle AQ documentation for more details on the dbms_aq package). 

Translation for Outbound Propagation for MQSeries

DBMS_AQ.ENQUEUE

Oracle AQ queue properties and queue table properties are thought to have no impact on heterogeneous outbound message propagation.  However, some queue properties and queue table properties are important for outbound message propagation and they are therefore listed here in Table 11-1 with the enqueue options and message properties.

Table 11-1 DBMS_AQ.ENQUEUE

Oracle AQ Argument Translation for IBM MQSeries (outbound propagation)
queue_name N.A.  This is the Oracle AQ source queue.
enqueue_options Refer to table on enqueue_options_t  next.
message_properties Refer to table on message_properties_t  next.
payload The message data is propagated to MQSeries.  Outbound message propagation supports only RAW payloads.

Note:  The maximum length of payload for MQSeries V2, V5, and Oracle AQ is respectively 4M, 100M, and 32K.  Therefore, payloads for outbound message propagation are restricted to 32K.

msgid No translation

Note:  Although IBM MQSeries allows applications to set msgid, Oracle AQ does not support this feature.  Therefore, propagation of msgid values cannot be supported.

DBMS_AQADM.CREATE_QUEUE_TABLE

Oracle AQ Queue Table properties are specified upon using the create_queue_table() procedure (refer to the Oracle AQ documentation for more details on the dbms_aqadm  package).  Outbound message propagation for MQSeries will use the following translations:

Table 11-2 DBMS_AQADM.CREATE_QUEUE_TABLE

Oracle AQ Property Translation for IBM MQSeries (outbound propagation)
queue_table N.A.
queue_payload_type N.A.

Note:  Propagation supports only Oracle AQ source queues of type RAW.

storage_clause N.A.
sort_list No translation

Note:  Propagation retains order of messages when moving them from source to destination queue.

multiple_consumers No translation

Note:  Although MQSeries V5 supports multiple consumers per message, outbound message propagation will not bundle messages when distributing them to MQSeries. 

message_grouping No translation

Note:  Outbound message propagation will preserve grouping of messages.  In other words, all messages belonging to a group are propagated to an MQSeries destination queue and are not visible to MQSeries consumers until the last message of the group has been propagated successfully.

comment N.A.
auto_commit N.A.

DBMS_AQADM.CREATE_QUEUE

Oracle AQ Queue properties are specified upon using the create_queue() procedure (refer to the Oracle AQ documentation for more details on the dbms_aqadm package).  Outbound message propagation for MQSeries will use the following translations:

Table 11-3 DBMS_AQADM.CREATE_QUEUE

Oracle AQ Property Translation for IBM MQSeries (outbound propagation)
queue_name N.A.
queue_table N.A.
queue_type N.A.
max_retries N.A.
retry_delay N.A.
retention_time N.A.
dependency_tracking N.A.
comment N.A.
auto_commit N.A.

DBMS_AQ.ENQUEUE_OPTIONS_T

Upon entering a message in the Oracle AQ source queue using the enqueue() procedure (refer to the Oracle AQ documentation on dbms_aq package), the Oracle AQ application can specify enqueue options.  Outbound message propagation for MQSeries will use the following translations:

Table 11-4 DBMS_AQ.ENQUEUE_OPTIONS_T

Oracle AQ Option Translation for IBM MQSeries (outbound propagation)
visibility N.A.  It does not apply to a propagation context.
relative_msgid No translation.  Refer to sequence_deviation.
sequence_deviation No translation.  There is no equivalent service in MQSeries.

DBMS_AQ.MESSAGE_PROPERTIES_T

Upon entering a message in the Oracle AQ source queue using the enqueue() procedure (refer to the Oracle AQ documentation on dbms_aq package), the Oracle AQ application can specify message properties.  Outbound message propagation for MQSeries will use the following translations:

Table 11-5 DBMS_AQ.MESSAGE_PROPERTIES_T

Oracle AQ Property Translation for IBM MQSeries (outbound propagation)
priority Translated to MQMD.Priority. 

Values 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are translated respectively to 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,

Values < 0 are translated as 9,

Values >= 10 are translated to 0.

delay No translation.  Equivalent support not available in MQSeries

If Oracle AQ would support delay in the source queue when protocol is NOT equal to 0, then heterogeneous outbound propagation could provide delay support.

expiration Translated to MQMD.Expiry

Value NEVER translated to MQEI_UNLIMITED.

Values in seconds -> tenth of seconds.

Note:  The expiration value in seconds is adjusted by subtracting the already expired time since the message was enqueued at enqueue_time  in the Oracle AQ source queue. 

correlation Translated to MQMD.CorrelId.  Values are handed over as binary data and values longer than 24 characters are truncated.
attempts No translation.
recipient_list No translation.  Although MQSeries V5 supports multiple consumers per message, outbound message propagation will not bundle messages when distributing them to MQSeries.

Note:  The outbound message propagation process for MQSeries internally uses the recipient_list information specified by the Oracle AQ application but does not need to forward it to MQSeries

exception_queue No translation

Note:  The outbound message propagation process for MQSeries internally uses the exception_queue information specified by the AQ application but does not need to forward it to MQSeries

enqueue_time No translation

Note:  Upon propagation the MQSeries Queue Manager will populate the MQMD.PutTime and MQMD.PutDate fields automatically.

state No translation

Note:  The AQ queue monitor internally maintains the state information, but the outbound message propagation process for MQSeries does not forward it to MQSeries

Configuring Outbound Message Propagation

Configuration is needed on the OracleÒ server, the Oracle Procedural GatewayÒ, and the IBM MQSeries to facilitate message propagation to an IBM MQSeries queue

Oracle integrating server: A database link must be set up to point to the MQSeries gateway.
Gateway: The gateway must be set up to be the proxy of one IBM MQSeries queue manager (called 'gateway queue manager'), and must be run under strict security mode.
MQSeries: If the target MQSeries queue is under the gateway queue manager, then no configuration is required.  Otherwise, a remote queue must be created in the gateway queue manager to point to the target queue.

Figure 11-1 Heterogeneous Outbound Message Propagation

Description of 11_01.gif is contained in the surrounding text

To propagate a message from Oracle Advanced Queue 'aq12' under Oracle server 'ora1' over to IBM MQSeries queue 'ny11' under queue manager 'mgr.ny.1', the following configuration is required:

Oracle server: database link pg4mq in ora1 to point to the MQSeries gateway
Gateway: configure the gateway with queue manager mgr.gtw and  setup strict security mode.
MQSeries: create remote queue xmit1 under queue manager mgr.gtw for the remote queue ny11 under queue manager mgr.ny.1, and create transmission queue and channels for the remote queue manager mgr.ny.1 if they do not already exist.

Operational Interface for Individual Messages

Oracle AQ allows propagation to be defined for queues and individual messages.  This section describes how heterogeneous outbound message propagation will work for individual messages; the section hereafter will outline how outbound message propagation is configured for a queue.

For heterogeneous outbound message propagation of individual messages, we will re-use the Oracle AQ operational interface.  Oracle AQ application will be able to specify non-Oracle consumers for a message using the standard recipient list mechanism.  Upon enqueuing a message, the message_properties argument of the enqueue() procedure allows the Oracle AQ application to specify a list of recipients.  For heterogeneous outbound message propagation, the fields of the structure used to specify the recipient will contain the communication information to access the non-Oracle AQ destination queue.

Refer to the next figure with definitions of the Oracle AQ enqueue() procedure and Oracle AQ types involved in this model:

dbms_aq.enqueue (
      queue_name          IN       varchar2,
      enqueue_options     IN       enqueue_options_t,
      message_properties  IN       message_properties_t,
      payload             IN       raw,
      msgid               OUT      raw

TYPE dbms_aq.enqueue_options_t IS RECORD (
      visibility           binary_integer,
      relative_msgid       raw(16),
      sequence_deviation   binary_integer)

TYPE dbms_aq.message_properties_t IS RECORD (
      priority            binary_integer,
      delay               binary_integer,
      expiration          binary_integer,
      correlation         varchar2(128),
      attempts            binary_integer,
      recipient_list      aq$_recipient_list,
      exception_queue     varchar2(51),
      enqueue_time        date,
      state               binary_integer) 
TYPE dbms_aq.aq$_recipient_list_t IS TABLE OF
      sys.aq$_agent INDEX BY binary_integer

TYPE dbms_aq.sys.aq$_agent IS OBJECT (
      name                  varchar2(30),
      address               varchar2(1024),
      protocol              number)

Refer to the Oracle AQ documentation for detailed information on how to use the enqueue() procedure and its arguments.  For heterogeneous outbound message propagation, the usage is generally compatible with Oracle AQ propagation.  Some arguments have different behavior however, due to the limited capabilities of the non-Oracle message queuing system:


sys.aq$_agent usage

Table 11-6 sys.aq$_agent.usage

Field Description
name is a unique feature in Oracle AQ to identify the intended consumer of the message.  The information is not forwarded to the non-Oracle message queuing system. 

Note:  Administrators use the name to track the propagation status of individual messages.

address is used to specify the non-Oracle destination queue and the communication path to access the non-Oracle queuing system.  Using Oracle gateways, the same database link mechanism that is used to specify a remote Oracle AQ server in homogeneous Oracle AQ propagation is also used to specify a gateway for a non-Oracle message queuing system.

Syntax:

<non_oracle_queue>@<database_link>

The syntax and maximum length of the non-Oracle queue name depend on the non-Oracle message queuing system and could differ from Oracle AQ.

protocol specifies the type of outbound message propagation protocol. 

Valid value:

DBMS_HQADM.MQSERIES_OUTBOUND for IBM MQSeries.

The following example demonstrates how the Oracle AQ operational interface can be used for both Oracle AQ and heterogeneous outbound message propagation.  The code excerpt shows part of an Oracle AQ application that specifies both Oracle AQ and non-Oracle AQ consumers as recipients for a message entered into an Oracle AQ queue:

Example:

DECLARE

    enqueue_options    DBMS_AQ.ENQUEUE_OPTIONS_T;
    message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
    recipients         DBMS_AQ.AQ$_RECIPIENT_LIST_T;
    message_handle     RAW(16);
    message            RAW(255) := 'something';

BEGIN

    /* message receiver 1:  queue aq1 at remote Oracle Database */

    recipients(1) : = SYS.AQ$_AGENT('Joe', 'aq1@remoteAq', 0);

    /* message receive 2:   queue mq1 at MQSeries */

    recipients(2) : = SYS.AQ$_AGENT('John', 
                                    'mq1@mqseries', 
                                    DBMS_HQADM.MQSERIES_OUTBOUND);  

    message_properties.recipient_list := recipients;

    /* enqueue the message */

    DBMS_AQ.ENQUEUE(queue_name => 'msg_queue',
                    enqueue_options => queue_options,
                    message_properties => message_properties,
                    payload => message,
                    msgid => message_handle);

    COMMIT;

END;
/

The example propagates the same message to two different recipients:


Recipient 1: Joe at aq1@remoteAq

As the protocol number 0 indicates, this is Oracle AQ propagation with the destination queue 'aq1' residing at a remote Oracle database referred to by database link 'remoteAq'.  The intended consumer of the message is consumer 'Joe'.


Recipient 2: mq1@ mqseries

Protocol DBMS_HQADM.MQSERIES_OUTBOUND indicates outbound message propagation from Oracle AQ to MQSeries.  The destination is MQSeries queue 'mq1', which can be reached using the MQSeries gateway.  The gateway is referred to by the database link 'mqseries'.  Because MQSeries does not have the concept of message consumer,  'John' will be ignored during propagation.

Operational Interface for Queues

Oracle AQ allows propagation to be defined for queues and individual messages.  The previous section described how heterogeneous outbound message propagation works for individual messages.  This section will define how to configure heterogeneous outbound message propagation for an Oracle AQ queue.

The Oracle AQ administrator's application will be able to specify non-Oracle consumers for an Oracle AQ queue using the standard subscriber mechanism.  After having created a queue, the Oracle AQ administrator can use the add_subscriber() procedure to add a non-Oracle AQ subscriber.  Subscribers are defined using a sys.aq$_agent structure. 


Note:

Propagation that is specified for individual messages using a recipient_list overrides heterogeneous subscribers that are specified for queues.

The next figure shows the definitions of the Oracle AQ add_subscriber() procedure and Oracle AQ structures that are used for specifying heterogeneous outbound message propagation for Oracle AQ queues.

Oracle AQ Procedures and Structures


Oracle AQ procedures and structures used with outbound message propagation for Oracle AQ queues
DBMS_AQADM.ADD_SUBSCRIBER (
     queue_name IN    varchar2,
     subscriber       sys.aq$_agent)

TYPE sys.aq$_agent IS OBJECT (
      name           varchar2(30),
      address        archar2(1024),
      protocol       number)

Refer to the Oracle AQ documentation for detailed information on how to use the add_subscriber() procedure and its arguments.  For heterogeneous outbound message propagation, the usage is generally compatible with Oracle AQ propagation.  However, the sys.aq$_agent structure that is used to specify the subscriber plays a key role in heterogeneous outbound message propagation.  Its fields are used to specify the non-Oracle destination queue of the subscriber.

Refer to Table 11-6, "sys.aq$_agent.usage" for a description of the sys.aq$_agent field for heterogeneous outbound message propagation.

The following example demonstrates how Oracle AQ and heterogeneous propagation can be specified using the same Oracle AQ administrative interface.  The code example shows part of an Oracle AQ application that adds both Oracle AQ and non-Oracle AQ subscribers for an Oracle AQ queue:


Example
DECLARE
  subscriber SYS.AQ$_AGENT;
BEGIN
  /* Add an AQ subscriber */
  subscriber := SYS.AQ$_AGENT('Joe', 
                              'aq1@remoteAq', 
                              0);

  DBMS_AQADM.ADD_SUBSCRIBER(queue_name => 'source_queue',
                            subscriber => subscriber );

  /* Add an non-AQ subscriber */

  subscriber := SYS.AQ$_AGENT('John', 
                              'mq1@mqseries', 
                              DBMS_HQADM.MQSERIES_OUTBOUND);

  DBMS_AQADM.ADD_SUBSCRIBER(queue_name => 'source_queue',
                            subscriber => subscriber );

END;
/

The above example specifies an Oracle AQ and a non-Oracle AQ subscriber for 'source_queue' such that any message entered into the source queue will automatically be propagated to the following subscribers:


AQ Subscriber: Joe at aq1@remoteAq

This will initiate Oracle AQ propagation, with the destination queue 'aq1' residing at a remote OracleÒ database referred to by database link 'remoteAq', and with the intended consumer of the message set to 'Joe'.


Non-AQ subscriber: mq1@pg4mqseries

Protocol DBMS_HQADM.MQSERIES_OUTBOUND indicates outbound message propagation from Oracle AQ to MQSeries (refer to Table 11-6, "sys.aq$_agent.usage" for valid protocol numbers).  The destination is an MQSeries queue 'mq1' that can be reached by the MQSeries gateway.  The gateway is referred to by the database link 'mqseries'.  Because MQSeries does not have the concept of message consumer,  'John' will be ignored during propagation.

Administrative Interfaces

For propagation in a homogeneous Oracle AQ environment, the administrator uses the Oracle AQ package DBMS_AQADM with procedures to schedule a propagation job.  Specifying an Oracle AQ propagation job requires specifying three items:

  1. an Oracle AQ source queue name

  2. the destination

  3. the scheduling times

The Oracle AQ administration package in Oracle 8.0.4 and Oracle 8.1 cannot yet accommodate heterogeneous protocols.  For this reason, a separate scheduling package is used.  This scheduling package has procedures for the scheduling and unscheduling of heterogeneous outbound message propagation.  The procedures that are in this package resemble the Oracle AQ scheduling procedures. 

The procedures maintain schedules in dictionary tables.  These procedures are read by the propagation process to determine when a queue, and which queue, is due for another round of message propagation.  The schedule information is available through a view named DBA_OUTBOUND_SCHEDULES (refer to Appendix D, " Heterogeneous Message Propagation DBA Views").  The package that contains the scheduling procedures (both inbound and outbound) is named DBMS_HQADM and contains two procedures for outbound message propagation:

The two outbound scheduling procedures that are in the package are each composed of a name, purpose, syntax, usage, and error messages.  These two outbound scheduling procedures are described next.

Procedures for Outbound Message Propagation

Name:  SCHEDULE_PROPAGATION


Purpose

Upon calling, the procedure schedules propagation of messages from an Oracle AQ source queue to a non-Oracle destination queue.  If a message has multiple consumers at the same non-Oracle destination in the same or different queues, then the message will be propagated to all of them at the same time.


Syntax
dbms_hqadm.schedule_propagation(
      queue_name           in      varchar2,
      protocol             in      number,
      destination          in      varchar2,
      start_time           in      date default SYSDATE,
      duration             in      number default NULL,
      next_time            in      varchar2 default NULL,
      latency              in      number default 60 )

Usage:
Parameter Description
queue_name specifies the name of the source Oracle AQ queue whose messages are to be propagated.  The name includes the schema name.  If the schema name is not specified, then queue_name defaults to the schema name of the administrative user.

Note:  Heterogeneous outbound message propagation supports queues of type RAW, and only type RAW.

protocol specifies the type of outbound message propagation protocol.

Valid values: DBMS_HQADM.MQSERIES_OUTBOUND

destination defines the foreign queue and database link to the gateway for accessing the non-Oracle message queuing system.  Messages in the source queue for recipients at this destination will be propagated.  If the name is not fully qualified, then the default domain name is used.

Note:  Although NULL is accepted as a valid destination value for Oracle AQ propagation, NULL is not accepted as a valid destination value for heterogeneous outbound message propagation.

start_time specifies the initial start time for the propagation window for messages from the Oracle AQ source queue to the non-Oracle destination queue.
duration specifies the duration of the propagation window in seconds.  A NULL value means that the propagation window is forever, or until the propagation is unscheduled.
next_time specifies the initial start time for the propagation window for messages from the Oracle AQ source queue to the non-Oracle destination queue.
latency is the maximum wait, in seconds, in the propagation window for a message to be propagated after it is enqueued.  However, if the latency is (for example) 60 seconds, and if no messages are waiting to be propagated, then during the propagation window, messages from that Oracle AQ source queue for the non-Oracle destination queue will not be propagated for at least 60 more seconds. 

If the latency is 0, then the heterogeneous propagation process will be waiting for messages to be enqueued for the destination, and as soon as a message is enqueued, it will be propagated.

Error Messages

ORA-20001An invalid value was specified for QUEUE_ADDRESS.  The value should be of the form queue@dblink[.domain]

Cause: The foreign queue specification for the source and/or destination parameter is either NULL or not in the right format.

Action: Check the parameter, and correct the mistake.

ORA-20002Heterogeneous propagation for ADT queues is not yet supported.

Cause: The Oracle AQ queue that was specified for heterogeneous propagation is an ADT queue, which is not supported.

Action: Specify a RAW queue.

ORA-20003This error occurred while creating a MIP for this schedule.

Cause: The propagation package has a problem creating the interface to the foreign queue system for the schedule.

Action: This is an internal error.  Report this error to Oracle.

Name:  UNSCHEDULE_PROPAGATION


Purpose

This procedure for outbound message propagation unschedules previously scheduled heterogeneous outbound message propagation from an Oracle AQ source queue to a non-Oracle destination.  If no messages are left on the propagation-exception queue or the transmit queue then these queues will be deleted.  If these queues still hold messages, then the procedure will fail unless the user specifies the force option as TRUE, causing the messages to be purged and the queues to be cleaned up.  Refer to the section on "Exception Handling" for more information about the propagation-exception and transmit queues. 


Syntax
dbms_hqadm.unschedule_propagation(
      queue_name    in     varchar2,
      protocol      in     number,
      destination   in     varchar2 default NULL,
      force         in     boolean default FALSE)

Usage
Parameter Description
queue_name specifies the name of the source queue whose outbound message propagation schedule should be ended. 

The name includes the schema name.  If the schema name is not specified, then queue_name defaults to the schema name of the administrative user.

protocol specifies the type of outbound message propagation protocol.

Valid values:  DBMS_HQADM.MQSERIES_OUTBOUND

destination defines the database link to the gateway for accessing the non-Oracle message queuing system.  Messages in the source queue for recipients at this destination will be propagated.  If the name is not fully qualified, then the default domain name is used.

Note:  Although NULL is accepted as a valid destination value for Oracle AQ propagation, for heterogeneous outbound message propagation, NULL is not accepted as a valid destination value.

force specifies whether the procedure should succeed even if messages are left behind on the propagation-exception or transmit queues.

Refer to the section on "Exception Handling" for more information about the propagation-exception and transmit queues.

Valid values:

TRUE:  Any message that is left on the exception or transmit queue will be purged, and the queues will be cleaned up.

FALSE:  The procedure will fail when messages are found on either the exception or transmit queue.

Error Messages:

ORA-20001Invalid value for QUEUE_ADDRESS, should be of the form queue@dblink[.domain]

Cause: The foreign queue specification for the source/destination parameter is either NULL or is not in the right format.

Action: Check the parameter, and correct the mistake.

ORA-20004Propagation is still in progress.

Cause: Messages are left in the xmit queue or the exception queue.

Action: Use the 'force' option, or wait until the propagation is finished.

Example

Continuing on the earlier example of using the Oracle AQ operational interface for both Oracle AQ and heterogeneous outbound message propagation, the following code example demonstrates how Oracle AQ administrators would schedule propagation for both.

BEGIN

  /* schedule propagation for AQ */

  DBMS_AQADM.SCHEDULE_PROPAGATION(queue_name  => 'aq1',
                                  destination => 'remoteAq');

  /* schedule outbound propagation for MQSeries */

  DBMS_HQADM.SCHEDULE_PROPAGATION(queue_name => 'mq1',
                           protocol => DBMS_HQADM.MQSERIES_OUTBOUND,
                           destination =>'QUEUE1@dblink');

END;
/

Security

Heterogeneous Message Propagation does not impose new authorization requirements on either Oracle AQ or non-Oracle operational applications.  For outbound message propagation, a sending Oracle AQ application enqueues the messages into the source queue but does not require authorization for the recipient and/or subscriber's queue at the non-Oracle message queuing system.  Non-Oracle consumers require authorization only for the non-Oracle AQ destination queue.

At the administration level, the user who schedules heterogeneous propagation for a source and/or destination tuple:

The user name and password specified for the database link require access privileges at the message queuing system of the destination queue.  If the database link does not specify a user name and password, then it will implicitly use the ID of the current Oracle user. 

Given these access privileges, the propagation process can dequeue the messages from the source queue and enqueue them through the gateway into the destination queue.  This method of controlling access privileges ensures that the security issue for outbound message propagation remains transparent to both sender and consumer applications.

Exception Handling

If the outbound message propagation process cannot propagate messages from the Oracle AQ source queue to their destination, then the messages will be moved to either a propagation exception queue or to an inactive transmit queue, as explained below.


Propagation Exception Queue

For each schedule that is created by using the dbms_hqadm.schedule_propagation() procedure, an exception queue is created to stage messages that could not be successfully moved to the destination queue.  Administrators can check the exception_queue field in the table DBA_OUTBOUND_SCHEDULES (refer to Appendix D, " Heterogeneous Message Propagation DBA Views") to obtain the name of this exception queue and to monitor it.

Upon unscheduling a propagation job by using the dbms_hqadm.unschedule_propagation() procedure, the exception queue is removed again (for full details, refer to the description of this procedure at "Name:  UNSCHEDULE_PROPAGATION").


Inactive Transmit Queues

Inactive transmit queues are created by the propagation process upon encountering messages in a source queue for which no propagation has been scheduled yet.  Administrators can check the transmit_queue field in the table DBA_OUTBOUND_SCHEDULES (refer to Appendix D, " Heterogeneous Message Propagation DBA Views") to obtain the name of this queue (if any) and monitor it.

Upon unscheduling a propagation job using the dbms_hqadm.unschedule_propagation() procedure, the inactive transmit queue is removed again (for full details, also refer to the description of this procedure).


Inactive transmit queue explanation:

The Oracle AQ API allows the propagation process to dequeue messages by protocol but not by destination or source.  This means that messages with the same protocol but different destination or source are all dequeued at once.  To avoid this, the propagation process must perform a 2-phase-commit when distributing messages to their respective destinations.  The propagation process stages these messages into dedicated transmit queues.  Each transmit queue is reserved for a particular schedule.  If, however, no schedule was created for a message, and thus no transmit queue exists yet, then the propagation process creates an inactive transmit queue and moves the message in there.

Schedule Status

Status Information can be obtained both for an outbound message propagation schedule and for individual messages.

Status of an Outbound Message Propagation Schedule

The administrator can check the view, DBA_OUTBOUND_SCHEDULES, to determine if outbound message propagation has been scheduled for a particular combination of Oracle AQ source queue and non-Oracle destination queue.  For each created schedule that the outbound message propagation process maintains in this view, the names of exception and transmit queues are included, as well as up to date status and statistics and other information. 

For example, to find all schedules not running because of a failure, and to find the reason for the failure, the following query can be executed:

SELECT ERROR_TIME, ERROR, ERROR_MSG 
FROM DBA_OUTBOUND_SCHEDULES
WHERE DISABLED = 'Y';


Previous Next
Oracle Logo
Copyright © 2001, 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents
Go To Index
Index