Checkpoints
The Checkpoint implementation is used to capture the causal relationship between "pseudo-events" that occur within IPF.
The ProcessingContext contains a updatable checkpoint field that relates to a unique identifier of a given IPF processing object.
ConnectorMessageMetadata
public class ConnectorMessageMetadata {
private final Checkpoint checkpoint;
}
The ConnectorMessage class contains an element called metadata. This ConnectorMessageMetadata allows a Checkpoint to be assigned to the ConnectorMessage that is passed between Connector stages without directly influencing the message ProcessingContext.
ReceiveConnector
For a ReceiveConnector, the inbound message ProcessingContext is updated through the following Connector stages:
-
CorrelationStage
-
If the received message contains a processing context, any processing context contained in the correlation will be merged with the message context. See Context Merging documentation for further details.
-
-
MessageLoggingStage
-
The inbound message’s ProcessingContext checkpoint is passed into the logged Message
-
The MessageLogEntry’s unique
messageIdis assigned to the ConnectorMessageMetadatacheckpointfield.
-
-
Checkpoint Stage
-
If the ConnectorMessageMetadata
checkpointfield exists, use it to generate the ProcessingContextcheckpointfield, creating a causal link between the previous IPF object and the ProcessingContext.
-
The ProcessingContext is then persisted to the remainder of the Connector flow.
SendConnector
For a SendConnector, the outbound message’s ProcessingContext is updated through the following Connector stages:
-
Before any stage when the MessageDelivery instance is created
-
New
messageIdis calculated and assigned to the SendConnectorMessageMetadatacheckpointfield. -
The checkpoint of a current SendRequest ProcessingContext is assigned to the SendConnectorMessageMetadata
previousCheckpointfield. -
Both ConnectorMessage ProcessingContext and target message ProcessingContext (if target message is an instance of
UpdatebleProcessingContextHolder) are updated with the SendConnectorMessageMetadatacheckpointfield, creating a causal link between the previous IPF object and the ProcessingContext.
-
-
MessageLoggingStage
-
SendConnectorMessageMetadata
checkpointis passed into the logged Message and used as a value formessageId. -
SendConnectorMessageMetadata
previousCheckpointis passed into the logged Message and used as a value forprocessingContext.checkpoint.
-
The ProcessingContext is then persisted to the remainder of the Connector flow.