You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* close#6658
Add APIs to track content of Stash
* added basic stashing test cases
* updated API approvals
* Added `StashSize` to `Deploy`
* adding support for bounded stash sizes
* API approval
* adding `Props` and `ActorOf` support for configuring stash size
* added API approvals
* ensured that `IWithUnboundedStash` can't be accidentally made bounded via HOCON or config
* added `stashSize` to protobuf wire format
needed for remote deployments
* rename `StashSize` to `StashCapacity`
* renamed wire format from stashSize to stashCapacity
* added serialization support for `StashCapacity
* API approvals
* added documentation
* added bounded stashing api docs to untyped actor page
* added comment explaining backwards compat handling for StashCapacity
* fixed `DeploySurrogate` API
* fix `Deployer`
* fix `AbstractStash`
* fixed docs
Copy file name to clipboardExpand all lines: docs/articles/actors/untyped-actor-api.md
+32
Original file line number
Diff line number
Diff line change
@@ -758,6 +758,38 @@ Note that the stash is part of the ephemeral actor state, unlike the mailbox. Th
758
758
> [!NOTE]
759
759
> If you want to enforce that your actor can only work with an unbounded stash, then you should use the `UntypedActorWithUnboundedStash` class instead.
760
760
761
+
### Bounded Stashes
762
+
763
+
In certain scenarios, it might be helpful to put a limit on the size of the `IStash` inside your actor. You can configure a bounded stash via the following actor definition:
Either of these settings will configure the `IStash` to only have a maximum capacity of 2 items. If a third item is attempted to be stashed the `IStash` will throw a `StashOverflowException`.
787
+
788
+
> [!TIP]
789
+
> You can always check to see if your `IStash` is approaching its capacity by checking the `IStash.IsFull`, `IStash.Capacity`, or `IStash.Count` properties.
790
+
791
+
If you attempt to apply a maximum stash capacity to an `IWithUnboundedStash` actor then the setting will be ignored.
792
+
761
793
## Killing an Actor
762
794
763
795
You can kill an actor by sending a `Kill` message. This will cause the actor to throw a `ActorKilledException`, triggering a failure. The actor will suspend operation and its supervisor will be asked how to handle the failure, which may mean resuming the actor, restarting it or terminating it completely. See [What Supervision Means](xref:supervision#what-supervision-means) for more information.
0 commit comments