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 Elements
    Modifier and Type
    Optional Element
    Description
    int
    The timeout for a single message in milliseconds.
    int
    The interval in milliseconds at which warning messages should be logged that the message handler is taking too long.
    int
    The time in milliseconds after which a warning message should be logged that the message handler is taking too long.
  • Element Details

    • timeoutMs

      int timeoutMs
      The timeout for a single message in milliseconds. A value of -1 indicates that the timeout should be used of the HandlerTimeoutConfiguration.
      Returns:
      the timeout for a single message handler in milliseconds
      Default:
      -1
    • warningThresholdMs

      int warningThresholdMs
      The time in milliseconds after which a warning message should be logged that the message handler is taking too long. A value of -1 indicates that the default warning threshold should be used.

      A value higher than the timeout (or the timeout from the configuration if is -1 on the annotation), will disable warnings.

      Returns:
      the time in milliseconds after which a warning message should be logged
      Default:
      -1
    • warningIntervalMs

      int warningIntervalMs
      The interval in milliseconds at which warning messages should be logged that the message handler is taking too long. A value of -1 indicates that the default warning interval should be used of the HandlerTimeoutConfiguration.
      Returns:
      the interval in milliseconds at which warning log messages should be displayed
      Default:
      -1