public interface ThrottlingPhaseTemplate extends MessageProcessTemplate
MessageSource must implement if it wants to participate in the
throttling phase when processing a message| Modifier and Type | Method and Description |
|---|---|
void |
discardMessageOnThrottlingExceeded()
Discards the message due to ThrottlingPolicy configured for the
MessageSource is
exceeded |
Event |
getEvent() |
void |
setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod,
long maximumRequestAllowedPerPeriod,
long timeUntilNextPeriodInMillis)
Set up throttling policy state to be used by the
MessageSource for debugging or
information purpose. |
Event getEvent() throws org.mule.runtime.api.exception.MuleException
Event created from the original messageorg.mule.runtime.api.exception.MuleExceptionvoid discardMessageOnThrottlingExceeded()
throws org.mule.runtime.api.exception.MuleException
MessageSource is
exceededorg.mule.runtime.api.exception.MuleExceptionvoid setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod,
long maximumRequestAllowedPerPeriod,
long timeUntilNextPeriodInMillis)
MessageSource for debugging or
information purpose.
Not all throttling policy supports statistics so this method may not be calledremainingRequestInCurrentPeriod - the remaining allowed messages in the current periodmaximumRequestAllowedPerPeriod - the maximum allowed messages in a periodtimeUntilNextPeriodInMillis - time in milliseconds until the next period startsCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.