Skip to content

Conversation

eaba
Copy link
Contributor

@eaba eaba commented Feb 3, 2022

Fixes #5563

Changes

Added Deadletter section

Copy link
Contributor Author

@eaba eaba left a 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!

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`.
Copy link
Contributor Author

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

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
Copy link
Contributor Author

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!

@Aaronontheweb Aaronontheweb self-requested a review February 3, 2022 17:41
@Aaronontheweb
Copy link
Member

I'll take a look @eaba

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add DocFx code refs

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:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to turn this into a DocFx ref

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All code samples in this doc need to be updated

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... they are terminated; they are terminated ...

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 ....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion cc @eaba

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note taken!

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) February 8, 2022 14:10
@Aaronontheweb Aaronontheweb merged commit 7a177c1 into akkadotnet:dev Feb 9, 2022
@eaba eaba deleted the unsubscribe_does_not_terminate_actor_doc branch February 9, 2022 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Unsubscribe does not terminate Topic Actor

3 participants