Integration Server 10.15 | Publish-Subscribe Developer’s Guide | Exactly-Once Processing for Documents Received by webMethods Messaging Triggers | Overview of Exactly-Once Processing
 
Overview of Exactly-Once Processing
 
Redelivery Count
Document History Database
Document Resolver Service
Within Integration Server, exactly-once processing is a facility that ensures one-time processing of a guaranteed document received by a trigger. Integration Server provides exactly-once processing by performing duplicate detection and by supplying the ability to retry trigger services.
Duplicate detection determines whether the current document is a copy of one previously processed by the trigger. Duplicate documents can be introduced in to the webMethods system when:
*The publishing client publishes the same document more than once.
*During publishing or retrieval of guaranteed documents, the sending resource loses connectivity to the destination resource before receiving a positive acknowledgement for the document. The sending resource will redeliver the document when the connection is restored.
Note:
Exactly-once processing and duplicate detection are performed for guaranteed documents only.
Integration Server uses duplicate detection to determine the document’s status. The document status can be one of the following:
*New. The document is new and has not been processed by the trigger.
*Duplicate. The document is a copy of one already processed the trigger.
*In Doubt. Integration Server cannot determine the status of the document. The trigger may or may not have processed the document before.
To resolve the document status, Integration Server evaluates, in order, one or more of the following:
*Redelivery count. Indicates how many times the transport has redelivered the document to the trigger.
*Document history database. Maintains a record of all guaranteed documents processed by triggers for which exactly-once processing is configured.
*Document resolver service. Service created by a user to determine the document status. The document resolver service can be used instead of or in addition to the document history database.
The steps that Integration Server performs to determine a document’s status depend on the exactly-once properties configured for the subscribing trigger. For more information about configuring exactly-once properties, see Configuring Exactly-Once Processing.
The table below summarizes the process thatIntegration Server follows to determine a document’s status and the action the server takes for each duplicate detection method.
Step 1
Check Redelivery Count
When the trigger is configured to detect duplicates, Integration Server will check the document’s redelivery count to determine if the trigger processed the document before.
Redelivery Count
Action
0
If using document history, Integration Server proceeds to Step 2 to check the document history database.
If document history is not used, Integration Server considers the document to be NEW. Integration Server executes the trigger service.
> 0
If using document history, Integration Server proceeds to Step 2 to check the document history database.
If document history is not used, Integration Server proceeds to Step 3 to execute the document resolver service.
If neither document history nor a document resolver service are used, Integration Server considers the document to be IN DOUBT.
-1 (Undefined)
If using document history, proceed to Step 2 to check the document history database.
If document history is not used, proceed to Step 3 to execute the document resolver service.
Otherwise, document is NEW. Execute trigger service.
Step 2
Check Document History
If a document history database is configured and the trigger uses it to maintain a record of processed documents, Integration Server checks for the document’s UUID in the document history database.
UUID Exists?
Action
No.
Document is NEW. Execute trigger service.
Yes.
Processing completed.
Document is a DUPLICATE. Acknowledge document and discard.
Yes.
Processing started.
If provided, proceed to Step 3 to invoke the document resolver service. Otherwise, document is IN DOUBT.
Step 3
Execute Document Resolver Service
If a document resolver service is specified, Integration Server executes the document resolver service assigned to the trigger.
Returned Status
Action
NEW
Execute trigger service.
DUPLICATE
Acknowledge document and discard.
IN DOUBT
Acknowledge and log document.
Note:Integration Server sends In Doubt documents to the audit subsystem for logging. If the messaging provider is Broker or the document is published locally, you can resubmit In Doubt documents using webMethods Monitor. Integration Server discards Duplicate documents. Duplicate documents cannot be resubmitted. For more information about webMethods Monitor, see the webMethods Monitor documentation.
The following sections provide more information about each method of duplicate detection.