Integration Server 10.3 | Publish-Subscribe Developer’s Guide | Exactly-Once Processing for Documents Received by webMethods Messaging Triggers | Overview of Exactly-Once Processing | Redelivery Count
 
Redelivery Count
The redelivery count indicates the number of times the transport (the Universal Messaging server, Broker or, for local publishing, the transient store) has redelivered a document to the trigger. The transport that delivers the document to the trigger maintains the document redelivery count. The transport updates the redelivery count immediately after the trigger receives the document. A redelivery count other than zero indicates that the trigger might have received and processed (or partially processed) the document before.
For example, suppose that your integration solution consists of an Integration Server and a Broker. When the server first retrieves the document for the trigger, the document redelivery count is zero. After the server retrieves the document, the Broker increments the redelivery count to 1. If a resource (Broker or Integration Server) shuts down before the trigger processes and acknowledges the document, the Broker will redeliver the document when the connection is re-established. The redelivery count of 1 indicates that the Broker delivered the document to the trigger once before.
The following table identifies the possible redelivery count values and the document status associated with each value.
A redelivery count of...
Indicates...
‑1
The resource that delivered the document does not maintain a document redelivery count. The redelivery count is undefined. Integration Server uses a value of -1 to indicate that the redelivery count is absent. For example:
*A document received from a Broker version 6.0 or 6.0.1 does not contain a redelivery count. (Brokers version 6.0.1 and earlier do not maintain document redelivery counts.)
*Any document received via a serial durable subscription on a Universal Messaging server does not have a redelivery count. Integration Server assigns the document a redelivery count of -1.
If other methods of duplicate detection are configured for this trigger (document history database or document resolver service), Integration Server uses these methods to determine the document status. If no other methods of duplicate detection are configured, Integration Server assigns the document a status of New and executes the trigger service.
0
This is most likely the first time the trigger received the document.
If the trigger uses a document history to perform duplicate detection, Integration Server checks the document history database to determine the document status. If no other methods of duplicate detection are configured, the server assigns the document a status of New and executes the trigger service.
> 0
The number of times the resource redelivered the document to the trigger. The trigger might or might not have processed the document before. For example, the server might have shut down before or during processing. Or, the connection between Integration Server and messaging provider was lost before the server could acknowledge the document. The redelivery count does not provide enough information to determine whether the trigger processed the document before.
If other methods of duplicate detection are configured for this trigger (document history database or document resolver service), Integration Server uses these methods to determine the document status. If no other methods of duplicate detection are configured, the server assigns the document a status of In Doubt, acknowledges the document, uses the audit subsystem to log the document, and writes a journal log entry stating that an In Doubt document was received.
Integration Server uses redelivery count to determine document status whenever you enable exactly-once processing for a trigger. That is, setting the Detect duplicates property to true indicates redelivery count will be used as part of duplicate detection.
Note:
You can retrieve a redelivery count for a document at any point during trigger service execution by invoking the pub.publish:getRedeliveryCount service. For more information about this service, see pub.publish:getRedeliveryCount.