Standard Resequencer Resequencing Order

22-6 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Time Window When the best effort resequencer is configured to use a time window instead of a maximum number rows, the messages to select and process at one time are based on a period of time you specify plus an optional buffer time. Each message belongs to a specific time window, and messages that are part of one time window are processed separately from messages belonging to a different time window. In addition to the time window, you can specify a buffer time, which is an overlap between two sequential time windows that allows messages that arrive a little late to be associated with the first time window. By default, the buffer time is 10 of the time window you specify. When the best effort resequencer is configured to use a time window, groups are processed in an iterative manner and messages are processed in the following steps: 1. The first message arrives and the time window begins. 2. The buffer is added to the time window, and processing begins after the buffer time. 3. The resequencer retrieves the messages that arrived within the time window, and identifies the maximum sequence ID typically a date and time stamp from all the messages. 4. The resequencer retrieves any messages that arrive within the buffer time and that have a sequence ID that is less than the maximum sequence ID identified above. 5. The resequencer sorts all messages retrieved in the above steps in ascending order of the sequence IDs and processes the messages.

22.2.3.1.2 Best Effort Resequencer Message Delivery

It is important to note that the messages to outbound services of the Oracle Mediator service component configured for best effort resequencing are not guaranteed to arrive in order of a sequence ID. At any given time, a snapshot of the available messages is taken and sequencing is performed only on those messages. Therefore, unlike a standard resequencer, it is not guaranteed that a message with a lesser sequence ID value is sent before a message that ha a greater sequence ID value but that arrived earlier. Messages with a lesser sequence ID value that arrive later might be processed in the following cycle when a snapshot of available messages is taken again and the messages are reordered.

22.2.3.2 Information Required for Best Effort Resequencing

When using the best effort resequencer, you must specify a group XPath expression, a sequence ID XPath expression, and the date type of the sequence ID numeric or dateTime. These specify where the resequencer should find the group and the sequence ID in the messages and how to handle the sequence ID. In addition, you must specify either a maximum number of rows to select for each resequencing batch or a time window during which the messages included in one batch arrive. Unlike the standard resequencer, the best effort resequencer has no knowledge about how the sequence is built. No further information is used by the best effort resequencer to perform its responsibilities.

22.2.3.3 Example of Best Effort Resequencing Based on Maximum Rows

Table 22–4 illustrates the behavior of the best effort resequencer when it is configured to use the maximum number of rows to determine which messages to process. In this example, msgXY,Z indicates that the message arrives as message number X to the Resequencing in Oracle Mediator 22-7 Oracle Mediator service component and the message contains sequenceID Y and group Z.

22.2.3.4 Example of Best Effort Resequencing Based on a Time Window

Table 22–5 illustrates the behavior of the best effort resequencer when it is configured to process messages based on the time period in which they arrive. In this example, the time window is 10 minutes, the buffer is 10 one minute, and msgXY indicates that the message arrives as message number X to the Oracle Mediator service component and the message contains the sequence ID Y. The first message arrives at 2:00:00, which starts the time window. The time window lasts until 2:10:00, but with the addition of the buffer time, messages that arrived until 2:11:00 are processed. Table 22–4 Best Effort Resequencer Behavior Based on Maximum Rows Group C Sequenced Messages msg031,c msg062,c msg103,c msg124,c msg124,c,msg103,c,msg062,c,msg031,c Note: For the best effort resequencer to work correctly, the messages must arrive in sequence or nearly in sequence. Otherwise, they are not resequenced correctly. If the messages do not arrive close together, set the value of the maxRowsRetrieved parameter to 1 so the next message in the sequence has enough time to arrive and be picked up by the next processing loop and therefore be delivered in sequence. Table 22–5 Best Effort Resequencer Behavior Based on a Time Window Group C MessageTime Sequenced Messages msg01042:00:00 msg02052:00:20 msg03012:00:30 msg04032:00:50 msg05072:04:20 msg06022:04:45 msg07132:05:10 msg08082:05:40 msg09062:08:40 msg10122:09:20 msg11102:10:30 msg12092:10:40 msg13142:10:50 msg14112:13:00 msg0301, msg0602, msg0403, msg0104, msg0205, msg0906, msg0507, msg0808, msg1209, msg1110, msg1012, msg0713