Interface IWithStash
The IWithStash
interface enables an actor to temporarily stash away messages that can not or
should not be handled using the actor's current behavior.
Note that the IWithStash
interface can only be used together with actors that have a deque-based
mailbox. By default Stash based actors request a Deque based mailbox since the stash
interface extends IRequiresMessageQueue<T>.
IDequeBasedMessageQueueSemantics
are requested via config:
akka.actor.mailbox.requirements {
"Akka.Dispatch.IBoundedDequeBasedMessageQueueSemantics" = your-custom-mailbox
}
Alternatively, you can add your own requirement marker to the actor and configure a mailbox type to be used for your marker.
For a Stash
that also enforces unboundedness of the deque see IWithUnboundedStash. For a Stash
that does not enforce any mailbox type see IWithUnrestrictedStash.
Inherited Members
Namespace: Akka.Actor
Assembly: Akka.dll
Syntax
public interface IWithStash : IWithUnrestrictedStash, IActorStash, IRequiresMessageQueue<IDequeBasedMessageQueueSemantics>