| Oracle9i Messaging Gateway Supplement Release 1 (9.0.1) Part Number A90837-01 |
|
Messaging Gateway, an Oracle9i feature, enables communication between applications based on non-Oracle messaging systems and Oracle's Advanced Queuing (AQ) feature. Advanced Queuing provides the propagation between two AQ queues to enable e-business (HTTP via IDAP). Messaging Gateway extends that propagation to legacy applications based on non-Oracle messaging systems.
Because Messaging Gateway is tightly integrated with Advanced Queuing and Oracle9i, it offers fully transactional and secure delivery of messages. Messaging Gateway guarantees that messages are delivered once and only once between AQ and non-Oracle messaging systems that support persistence. The AQ-like PL/SQL interface provides an easy-to-learn administrative API, especially for developers already proficient in using AQ.
This release of Messaging Gateway supports the integration of Oracle9i Advanced Queuing with IBM MQSeries 5.1- and MQSeries 5.2-based applications.
The following topics are discussed in this chapter:
Messaging Gateway provides the following functionality:
Messaging Gateway propagates messages between Advanced Queuing and non-Oracle messaging systems. Messages sent by Advanced Queuing applications can be received by non-Oracle message system applications. Conversely, messages published by non-Oracle message system applications can be consumed by Advanced Queuing applications.
Messaging Gateway supports the native message formats of messaging systems. AQ messages can have RAW or any ADT payload. MQSeries messages can be TEXT or byte messages of any type. This enables integration of existing applications of messaging systems.
Messaging Gateway facilitates message conversion between AQ messages and non-Oracle message system messages. Messages are converted through either automatic message conversion routines provided by Messaging Gateway or customized message transformation functions that you provide.
Messaging Gateway is managed through an AQ-like PL/SQL interface. Configuration information is stored in Oracle database tables. Message propagation is carried out by an external process of the Oracle database server.
Messaging Gateway guarantees that persistent messages are propagated exactly once if both the message system at the propagation source and the message system at the propagation destination support transactions.
If messages are not persistent or the transaction is not supported by the messaging systems at the propagation source and propagation destination, at-most-once propagation is guaranteed.
Messaging Gateway supports client authentication of Oracle database and non-Oracle messaging systems.
For Oracle database administrators to control access to the tables, views, and procedures created by the gateway, Messaging Gateway defines two roles, MGW_ADMINISTRATOR_ROLE and MGW_AGENT_ROLE, for gateway administration and propagation processing.
Messaging Gateway has two main components: an administration package named DBMS_MGWADM for gateway configuration and management, and a gateway agent that processes propagation, which consists of a propagation engine and a set of drivers that communicate with non-Oracle messaging systems.

The Messaging Gateway administration package, DBMS_MGWADM, provides an interface for gateway administrators to manage the gateway agent, set up propagation, and monitor propagation processing.
Through the administration package, you configure the gateway agent with the proper user name, password, and database connect string of the Oracle database in order for the agent to create connections to the database. You can also call procedures in the package to assign the maximum number of database connections and the size of the memory heap to the agent.
For the gateway agent to propagate messages to and from a non-Oracle messaging system, a messaging system link, which represents a communication channel between the agent and the non-Oracle messaging system, must be created using the administration package. Multiple messaging system links can be configured in the agent.
All non-Oracle queues that are involved in propagation must be registered using the administration package. Registering a non-Oracle queue in the gateway configuration does not create the physical queue in the non-Oracle messaging system, but only records information about the queue, such as the messaging system link to access it, its native name, and its domain (queue or topic). The physical queue must be created through the administration interfaces of the non-Oracle messaging system.
With messaging system links and non-Oracle queues configured, you can create propagation jobs to set up message propagation. A propagation job in Messaging Gateway consists of a propagation subscriber and a propagation schedule. A propagation subscriber is created to define the source queue and the destination queue of a propagation job. You manipulate the propagation schedule associated with the propagation job to control when the propagation job is processed.
Messaging Gateway provides database views for gateway administrators to query and check the current configuration information, the gateway agent running status, and the propagation job status and statistics.
Gateway configuration can be changed independent of whether the gateway agent is running or shut down. If the agent is running, the administration procedures send notifications to the agent for configuration changes. The agent will dynamically alter its configuration for most configuration changes, although some require that the agent be shut down and restarted before they take effect. All the procedures in the administration package are serialized to guarantee that the gateway agent receives notifications for the configuration changes in the same order they are made.
The gateway agent schedules and processes propagation jobs. The agent executes in an external process of the Oracle database server. The agent is started and terminated by calling the STARTUP and SHUTDOWN procedures in the administration package. Like all external processes of Oracle database server, the agent runs only when the database server that it resides in is up and running.
The agent contains a propagation engine and a set of drivers for supported non-Oracle messaging systems. The multithreaded propagation engine fairly schedules propagation jobs and provides parallel interjob and intrajob propagation processing. A polling thread in the agent periodically polls the source queues of enabled propagation jobs and wakes up worker threads to process propagation jobs if messages are available. The drivers in the gateway agent are instantiated when messaging links are created. The drivers run as clients of messaging systems for all messaging operations.
The agent writes log messages into its log files, which contain information about agent configuration, agent status, actions taken by the agent upon receiving dynamic notifications, status of propagation jobs, and all error messages.
You create propagation jobs to set up message propagation. A propagation job conceptually consists of a propagation subscriber and a propagation schedule.
Once a propagation subscriber is created, the gateway creates a subscription on the propagation source if the source is a topic (publish-subscribe). The gateway moves all messages that are published to the topic after the subscriber is created. If the propagation source is a point-to-point queue, the gateway moves all messages in the queue to the destination.
A propagation job is not processed until an associated propagation schedule is created. The gateway agent processes enabled propagation jobs. Disabling a propagation job stops the transfer of messages from the source queue to the destination queue, but does not stop subscription.
When a propagation job is processed, messages are dequeued in priority order from the source queue and enqueued to the destination queue. If a message fails to be converted from the source format to the destination format, the message is moved to the exception queue. Messages that have expired in a propagation source queue are not propagated to the destination queue.
Messaging Gateway allows you to specify a propagation message selector for a propagation job if the source messaging system of the propagation job supports message selectors. Only messages satisfying the message selector are propagated.
If a propagation job runs into failures during processing, the agent retries up to 16 times in an exponential backoff scheme before disabling the job.
When a message is propagated, it is converted from its native format in the source messaging system to its native format in the destination messaging system. The gateway provides automatic message conversions between simple and commonly used message formats. You can provide your own message transformation functions for customized message conversions.
|
|
![]() Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|