Skip to content
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

Akka.Router: automatically unpack IScheduledTellMsg when being handled through a router #7249

Merged
merged 7 commits into from
Jun 13, 2024

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Jun 12, 2024

Changes

Working on reproducing #7247

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Copy link
Member Author

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

Detailed my changes

{
var allRoutees = await router.Ask<Routees>(GetRoutees.Instance);
allRoutees.Members.Count().ShouldBeGreaterThan(0);
});
Copy link
Member Author

Choose a reason for hiding this comment

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

You can't target a /temp actor via ActorSelection, so I had to go through some extra steps in order to get the FutureActorRef added to the BroadcastGroup router here.

Router.Route(envelope.Message, envelope.Sender);
{
// Bugfix: https://github.com/akkadotnet/akka.net/issues/7247
if(envelope.Message is IScheduledTellMsg scheduledTellMsg)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the real fix here - and I describe the root of problems here on the issue itself #7247 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

Technically this change means that certain messages will now show up in Phobos traces if they're sent through a router via the scheduler. I am fine with that.

@Aaronontheweb Aaronontheweb changed the title added initial reproduction for #7247 Akka.Router: automatically unpack IScheduledTellMsg when being handled through a router Jun 12, 2024
@Aaronontheweb Aaronontheweb marked this pull request as ready for review June 12, 2024 14:05
Copy link
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

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

LGTM

@Arkatufus Arkatufus enabled auto-merge (squash) June 13, 2024 06:00
@Aaronontheweb Aaronontheweb merged commit 6bcab70 into akkadotnet:dev Jun 13, 2024
9 of 12 checks passed
@Aaronontheweb Aaronontheweb deleted the 7247-fix-ScheduledTellMsg branch June 13, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants