-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Docs: Updated Cluster Distributed PubSub documentation #5566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
01a1eee
2628de3
86c8d2a
bf988fd
35171c3
97c8e8a
1952cd0
f5a6da1
bc05dbb
973f797
c9b9d9c
f3d4de9
fe81971
09e1e46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ You register actors to the local mediator with `DistributedPubSubMediator.Subscr | |
|
|
||
| You publish messages by sending `DistributedPubSubMediator.Publish` message to the local mediator. | ||
|
|
||
| Actors are automatically removed from the registry when they are terminated, or you can explicitly remove entries with `DistributedPubSubMediator.Unsubscribe`. | ||
| Topic Actors are automatically removed from the registry when they are terminated - they are terminated if there are zero existing subscribers and no new subscription within a given deadline (the default is 2 minutes). You can change the deadline by setting `removed-time-to-live` to a desired duration. You can `Unsubscribe` from a topic with `DistributedPubSubMediator.Unsubscribe`. | ||
|
|
||
| An example of a subscriber actor: | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to turn this into a DocFx ref There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All code samples in this doc need to be updated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This would read better if it was two separate sentences. Also, the repeated verbiage looks out of place. It could be changed to something like ... they are terminated. Termination occurs when there are no .... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good suggestion cc @eaba There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note taken! |
||
|
|
@@ -205,6 +205,18 @@ It is also possible to broadcast messages to the actors that have been registere | |
|
|
||
| Typical usage of this mode is to broadcast messages to all replicas with the same path, e.g. 3 actors on different nodes that all perform the same actions, for redundancy. You can also optionally specify a property (`AllButSelf`) deciding if the message should be sent to a matching path on the self node or not. | ||
|
|
||
|
|
||
| ## Deadletter | ||
|
||
|
|
||
| There are three factors that determine when or if a message is published to Deadletter, namely: `send-to-dead-letters-when-no-subscribers`, zero existing subscribers and terminated topic! | ||
|
|
||
| - **`Send-to-dead-letters-when-no-subscribers`**: this is a `DistributedPubSub` setting that, if turned off or set to false (it is on/true by default), causes the sending of messages to the Deadletter to be skipped, when there are zero subscribers or the topic Actor is terminated! | ||
|
|
||
| - **Zero Existing Subscribers**: A message is sent to the Deadletter if **`Send-to-dead-letters-when-no-subscribers`** is on/true and there are no existing subscriber(s) to receive it. `Akka.Cluster` distributed pubsub does not support queueing up messages while there are no existing subscribers! | ||
|
|
||
| - **Terminated Topic Actor**: When there are no existing subscribers and no new subscription for a duration of, say 2 minutes (the default for `removed-time-to-live`), the Topic Actor is terminated and if **`Send-to-dead-letters-when-no-subscribers`** is on/true, messages are sent to Deadletter. | ||
|
|
||
|
|
||
| ## DistributedPubSub Extension | ||
|
|
||
| In the example above the mediator is started and accessed with the `Akka.Cluster.Tools.PublishSubscribe.DistributedPubSub` extension. That is convenient and perfectly fine in most cases, but it can be good to know that it is possible to start the mediator actor as an ordinary actor and you can have several different mediators at the same time to be able to divide a large number of actors/topics to different mediators. For example you might want to use different cluster roles for different mediators. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Aaronontheweb please correct if any error