FailureClassification

class FailureClassification(classifiers: List<FailureClassifier>, reasons: FailureReasons = FailureReasons.DEFAULT)

How a handler's failures are classified, by the runtime's subscriptions and by the test DSL alike: the kernel's own failures first (KernelFailures), of the failure or any of its causes, whatever the handler's lists say; then a handler's own @Retry(recoverable, unrecoverable) (HandlerRetry.classify), of the failure itself or, for an UnreadableEventException, of what the kernel could not read; then, for the failure and each of its causes in turn, each of classifiers in order, the first class one gives deciding; FailureClass.RECOVERABLE when none does. of orders them: the application's, then the modules' found on the classpath (MODULES), then the caller's own, then the built-in rules for Wow's SPI failures (BuiltInFailures). A HandlingRejectedException is no failure to classify: a business outcome, it parks the aggregate at once.

It also gives the reason a parked aggregate records for a failure (reasonOf), by its reasons: the class name and a value-free description, never the failure's message (#6588).

Constructors

Link copied to clipboard
constructor(classifiers: List<FailureClassifier>, reasons: FailureReasons = FailureReasons.DEFAULT)

Types

Link copied to clipboard

Functions

Link copied to clipboard

The class of failure of a handler whose budget is retry.

Link copied to clipboard
fun reasonOf(failure: Throwable): String

The reason a parked aggregate records for failure (FailureReasons.reasonOf).