public class IdempotentSecureHashMessageFilter extends IdempotentMessageFilter
IdempotentSecureHashMessageFilter
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.flowConstruct, idExpression, store, storePrefix, valueExpression
onUnacceptedFlowConstruct, throwOnUnaccepted, unacceptedMessageProcessor
logger, muleContext, next, notificationHandler
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
IdempotentSecureHashMessageFilter() |
Modifier and Type | Method and Description |
---|---|
protected String |
getIdForEvent(MuleEvent event) |
String |
getMessageDigestAlgorithm() |
void |
setMessageDigestAlgorithm(String messageDigestAlgorithm) |
accept, acceptMessageForFlowConstruct, createMessageIdStore, getIdExpression, getStore, getValueExpression, getValueForEvent, initialise, isNewMessage, processNext, setFlowConstruct, setIdExpression, setStore, setStorePrefix, setValueExpression
filterUnacceptedException, getUnacceptedMessageProcessor, handleUnaccepted, isThrowOnUnaccepted, process, setThrowOnUnaccepted, setUnacceptedMessageProcessor
addMessageProcessorPathElements, getAnnotation, getAnnotations, getListener, getMuleContext, isEventValid, setAnnotations, setListener, setMuleContext, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setListener
protected String getIdForEvent(MuleEvent event) throws MessagingException
getIdForEvent
in class IdempotentMessageFilter
MessagingException
public String getMessageDigestAlgorithm()
public void setMessageDigestAlgorithm(String messageDigestAlgorithm)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.