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

Fix WithSingleton and WithSingletonProxy API #520

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented Nov 13, 2024

Fixes #509

Changes

  • Allow for users to specify the singleton manager actor name

Checklist

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

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 +172 to +177
public bool? LogSingletonIdentificationFailure { get; set; }

/// <summary>
/// The period the proxy will wait until it logs a missing singleton warning, defaults to 1 minute
/// </summary>
public TimeSpan? SingletonIdentificationFailurePeriod { get; set; }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added Akka 1.5.31 missing singleton detection feature

Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines +1291 to +1300
/// <list type="bullet">
/// <item>
/// The complete singleton manager actor path name will be
/// <c>akka://MyActorSystem/user/singletonManagerName/singletonName</c>
/// </item>
/// <item>
/// The complete singleton proxy actor path name, if created, will be
/// <c>akka://MyActorSystem/user/singletonName-proxy</c>
/// </item>
/// </list>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added explanation on what the actor names will be in the XML-DOC

Comment on lines +1330 to +1336
public static AkkaConfigurationBuilder WithSingleton<TKey>(
this AkkaConfigurationBuilder builder,
string singletonManagerName,
string singletonName,
Func<ActorSystem, IActorRegistry, IDependencyResolver, Props> propsFactory,
ClusterSingletonOptions? options = null,
bool createProxyToo = true)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New API that allows users to specify the singleton manager actor name.

The resulting singleton path will be akka://MyActorSystem/user/singletonManagerName/singletonName

Old APIs are untouched, they will still generate the same singleton actor path akka://MyActorSystem/user/singletonName/singletonName

Copy link

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

@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 merged commit 6b0a627 into akkadotnet:dev Nov 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WithSingleton extension method ignores singleton name specified in Akka HOCON
3 participants