Author: Elias Karthan, Chief Operating Officer
Author Note: This blog will be valuable for Architects and Developers that use Oracle SOA Suite to design and build integration processes.
Most companies have use cases requiring transaction process sequentially or in the same order that they were initiated. Unfortunately, SOA Suite asynchronous processing does not guarantee that transactions will reach their destination in the same order that they were initiated from the source. To address these requirements, developers often create solutions using database tables, Singleton BPEL processes, or Singleton JMS processes. These solutions can be inefficient or difficult to implement in clustered environments.
The Oracle SOA Suite Mediator Resequencer was designed to solve this problem. The Resequencer performs single threaded asynchronous processing based on groups. Transactions for each group are processed single threaded in sequence and groups are processed in parallel. The result is higher throughput than a straight single threaded implementation. The Resequencer can be used to guarantee processing in the order that transactions are received from the source or used to order transactions based on defined Groups and Sequence IDs.
The Oracle Mediator supports three patterns for resequencing:
1. Standard – Processes transactions contiguously within a Group, based on a defined Group and Sequence ID. Groups are processed in parallel.
2. FIFO (First-In-First-Out) – Processes transactions based on the time they are received by the Resequencer.
3. Best Effort – Processes transactions based on Sequence ID in increasing order at predefined intervals. Best Effort transaction processing is not always contiguous.
The Resequencer uses two tables in the SOAINFRA database to persist and manage transactions:
- Mediator_Resequencer_Message – Stores meta-data about the transaction
- Mediator_Group_Status – Stores Group related information about the transaction
These tables can be queried to obtain the status of Messages and Groups and the overall health of the Resequencer composite components.
In summary, requirements to process transactions in sequential order are commonly found in use cases in most organizations. The Mediator Resequencer is the component of the Oracle SOA Suite designed to implement in-order transaction processing, eliminating the need for custom development. Refer to the Oracle Fusion Middleware Developer’s Guide for Oracle SOA Suite for detailed information about configuring and using the Resequencer, or reach out to one of our experts.