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

Add ShardedDaemonProcess integration #463

Merged

Conversation

Arkatufus
Copy link
Contributor

Changes

  • Bump Akka to 1.5.24
  • Add integration for ShardedDaemonProcess and ShardedDaemonProcess proxy

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 - looks pretty clear to me

@@ -1011,6 +1011,69 @@ async Task Resolver(ActorSystem system, IActorRegistry registry, IDependencyReso
registry.Register<TKey>(shardRegionProxy);
});
}

public static AkkaConfigurationBuilder WithShardedDaemonProcess<TKey>(
Copy link
Member

Choose a reason for hiding this comment

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

LGTM - pretty straightforward

@Arkatufus Arkatufus marked this pull request as ready for review June 10, 2024 16:52
Copy link
Contributor Author

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

Self review

Comment on lines +105 to +117
builder.StartActors((system, registry) =>
{
try
{
base.InitializeTest(system, (ActorSystemSetup)null!, null, null);
_initialized.SetResult(Done.Instance);
registry.Register<TestProbe>(TestActor);
}
catch (Exception e)
{
_initialized.SetException(e);
}
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to move initialization to the start of the chain to make sure that we can inject TestActor into test actor constructors

this AkkaConfigurationBuilder builder,
string name,
int numberOfInstances,
Func<ActorSystem, IActorRegistry, IDependencyResolver, Func<int, Props>> entityPropsFactory,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to make the Props factory like this to support dependency injection

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

Copy link
Member

Choose a reason for hiding this comment

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

lgtm

{
try
{
base.InitializeTest(system, (ActorSystemSetup)null!, null, null);
_initialized.SetResult(Done.Instance);
registry.Register<TestProbe>(TestActor);
Copy link
Member

Choose a reason for hiding this comment

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

Ah, interesting

@Aaronontheweb Aaronontheweb merged commit f67decc into akkadotnet:dev Jun 10, 2024
2 checks passed
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.

2 participants