2. Idempotent Filter
Idempotent Filter is a filter in Mule ESB which allows only unique messages to
pass through it.
This works by providing a unique ID from the incoming message
4. Idempotent Filter
Uses object stores to store the unique executions, thus it keep tracks of the
previously executed executions.
When a new request comes, the idempotent filter checks for the ID of the
message in the object store. If present it does not allow the mule message to
pass through it, otherwise it allows the message to pass through.
By default it uses the default object store.
Choose an Object Store implementation suited to your requirement.
5. Configuration
name : Type: name (no spaces), optional - Identifies the processor so that other
elements can reference it. Required if the processor is defined at the global
level.
onUnaccepted : Events that are not accepted by the filter are sent to this
(optional) named message processor.
throwOnUnaccepted : Parameter to decide whether to throw an exception if a
message is not accepted
6. Configuration
idExpression: Defines one or more Mule expressions to use when extracting
the ID from the message.
valueExpression: Defines one or more expressions to use when extracting the
value from the message
storePrefix: If object store is to be used, Defines the prefix of the object store
names.
8. Snippets
Idempotent filter with managed-store
<idempotent-message-filter idExpression="#[message:payload]" doc:name="Idempotent
Message" throwOnUnaccepted="true" onUnaccepted="ValidationFailFlow"> <managed-
store storeName="NonPersistentManagedObjectStore" maxEntries="-1" entryTTL="10000"
expirationInterval="3000"/> </idempotent-message-filter>
9. Considerations
The idempotent filter uses object stores to store the unique executions, thus it
keep tracks of the previously executed executions.
So the Message id/key supplied to the filter should be Serialized