From e8e667c2286806de64dd597d765cbe29695d3f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Andr=C3=A9n?= Date: Wed, 30 Jun 2021 16:06:41 +0200 Subject: [PATCH] Clarify sharding stop message being local --- akka-docs/src/main/paradox/typed/cluster-sharding.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/akka-docs/src/main/paradox/typed/cluster-sharding.md b/akka-docs/src/main/paradox/typed/cluster-sharding.md index 85122ea25e..a1987b4ecf 100644 --- a/akka-docs/src/main/paradox/typed/cluster-sharding.md +++ b/akka-docs/src/main/paradox/typed/cluster-sharding.md @@ -284,6 +284,8 @@ the entity when it's supposed to stop itself due to rebalance or passivation. If it will be stopped automatically without receiving a specific message. It can be useful to define a custom stop message if the entity needs to perform some asynchronous cleanup or interactions before stopping. +The stop message is only sent locally, from the shard to the entity so does not require an entity id to end up in the right actor. When using a custom `ShardingMessageExtractor` without envelopes, the extractor will still have to handle the stop message type to please the compiler, even though it will never actually be passed to the extractor. + ### Automatic Passivation The entities are automatically passivated if they haven't received a message within the duration configured in