public enum ActorOptions.StashOverflow
Policy applied when ActorContext.stash is called and the actor's bounded stash is already at capacity.
There is no BLOCK variant: the handler running stash()
is on the actor's only worker thread, so blocking it on stash capacity
would deadlock.
| Enum constant | Description |
|---|---|
DROP_OLDEST |
The oldest stashed message is evicted to make room for the current one. |
FAIL |
ActorContext.stash throws IllegalStateException. |
REJECT |
The current message is rejected: any sendAndGet reply
is bound to IllegalStateException; any pending state
change computed by the current handler is discarded; the
message is not added to the stash and will not be
replayed. |
The oldest stashed message is evicted to make room for the current one. If the evicted message originated from Actor.sendAndGet, its reply is bound to IllegalStateException so the caller does not wait forever.
ActorContext.stash throws IllegalStateException.
The exception propagates out of the handler unless caught; if
uncaught, the dispatch treats it as a normal handler failure
(reply bound to the exception, onError fires).
The current message is rejected: any sendAndGet reply
is bound to IllegalStateException; any pending state
change computed by the current handler is discarded; the
message is not added to the stash and will not be
replayed.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.