Annotation Interface MessageHandlerTimeout
@Documented
@Retention(RUNTIME)
@Target({METHOD,CONSTRUCTOR})
@HasHandlerAttributes
public @interface MessageHandlerTimeout
Sets the timeout settings of a message handler. Takes precedence over configuration through
HandlerTimeoutConfiguration, for each property individually.
Any property set to -1 will use the default value of the
HandlerTimeoutConfiguration. For example, setting the timeout to
-1, and warningThreshold to 1000, will take the default timeout from the configuration, while
setting the warning threshold to 1000.
- Since:
- 4.11.0
- Author:
- Mitchell Herrijgers
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintThe timeout for a single message in milliseconds.intThe interval in milliseconds at which warning messages should be logged that the message handler is taking too long.intThe time in milliseconds after which a warning message should be logged that the message handler is taking too long.
-
Element Details
-
timeoutMs
int timeoutMsThe timeout for a single message in milliseconds. A value of-1indicates that the timeout should be used of theHandlerTimeoutConfiguration.- Returns:
- the timeout for a single message handler in milliseconds
- Default:
-1
-
warningThresholdMs
int warningThresholdMsThe time in milliseconds after which a warning message should be logged that the message handler is taking too long. A value of-1indicates that the default warning threshold should be used.A value higher than the
timeout(or the timeout from the configuration if is-1on the annotation), will disable warnings.- Returns:
- the time in milliseconds after which a warning message should be logged
- Default:
-1
-
warningIntervalMs
int warningIntervalMsThe interval in milliseconds at which warning messages should be logged that the message handler is taking too long. A value of-1indicates that the default warning interval should be used of theHandlerTimeoutConfiguration.- Returns:
- the interval in milliseconds at which warning log messages should be displayed
- Default:
-1
-