Nav

Idempotent Message Validator

Ensures that only unique messages continue through a flow’s execution by checking the unique ID of the incoming message.

Idempotent Message Validator

The Idempotent Message Validator ensures that only unique messages are passed on. It does this by checking the unique ID of the incoming message. To compute the unique ID, you can use a DataWeave expression, including the DataWeave Crypto functions that can compute hashes(SHA, MD5) from the data.

Parameters

Name Type Description Default Value Required

ID Expression

Expression

The expression to use when extracting the ID from the message.

#[correlationId]

 

Value Expression

Expression

The expression to use when extracting the value from the message. The result is what will be stored in the object store in case the Id is unique.

#[correlationId]

 

Object Store

Object Store

Either a name to reference a global object store or a definition of a private object store where the processed message IDs will be stored.

Object Store created by the Object Store Manager. Not persistent, with an entry TTL of 5 MINUTES and an expiration interval of 6 SECONDS.

 

Store Prefix

String

Defines the prefix of the object store names. This will only be used for the internally built object store.

configFileName.flowName.IdempotentMessageValidator

 

Message Hashing

DataWeave allows you to import a Crypto library that has some hashing functions defined. This can be useful when you want to compute a unique ID for the message by calculating a hash over it. For example, if you want to get an MD5 hash from the message and use it as the ID, the parameter 'ID Expression should be:

#[
    %dw 2.0
    output text/plain
    import dw::Crypto
    ---
    Crypto::hashWith(message,'MD5')
]