public class IdempotentSecureHashMessageValidator extends IdempotentMessageValidator
IdempotentSecureHashMessageValidator ensures that only unique messages are received by a service. It does this by
calculating the SHA-256 hash of the message itself. This provides a value with an infinitesimally small chance of a collision.
This can be used to filter message duplicates. Please keep in mind that the hash is calculated over the entire byte array
representing the message, so any leading or trailing spaces or extraneous bytes (like padding) can produce different hash
values for the same semantic message content. Care should be taken to ensure that messages do not contain extraneous bytes.
This class is useful when the message does not support unique identifiers.ReactiveProcessor.ProcessingTypeflowConstruct, idExpression, muleContext, store, storePrefix, valueExpression| Constructor and Description |
|---|
IdempotentSecureHashMessageValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getIdForEvent(Event event) |
String |
getMessageDigestAlgorithm() |
void |
setMessageDigestAlgorithm(String messageDigestAlgorithm) |
void |
setMuleContext(MuleContext context) |
createMessageIdStore, dispose, getIdExpression, getObjectStore, getValueExpression, getValueForEvent, initialise, isNewMessage, process, setFlowConstruct, setIdExpression, setObjectStore, setStorePrefix, setValueExpressiongetAnnotation, getAnnotations, getLocation, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProcessingTypepublic IdempotentSecureHashMessageValidator()
protected String getIdForEvent(Event event) throws org.mule.runtime.api.exception.MuleException
getIdForEvent in class IdempotentMessageValidatororg.mule.runtime.api.exception.MuleExceptionpublic String getMessageDigestAlgorithm()
public void setMessageDigestAlgorithm(String messageDigestAlgorithm)
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwaresetMuleContext in class IdempotentMessageValidatorcontext - the Mule node.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.