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 Broadcast message support to ShardedDaemonProcess #7451

Conversation

Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented Jan 9, 2025

Fixes #7450

Changes

Add Broadcast message support

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 +115 to +122
if (message is Broadcast broadcast)
{
var unwrapped = broadcast.Message;
foreach (var entityId in _entityIds)
{
_shardingRef.Forward(new ShardingEnvelope(entityId, unwrapped));
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Special case, when message is wrapped inside the Broadcast envelope, send the payload to all worker entities.

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 - I marked this as an "API change" but really it's a behavioral change. Either way, I think it's a nice addition to the ShardedDaemonProcess.

@Aaronontheweb Aaronontheweb merged commit 51ad038 into akkadotnet:dev Jan 9, 2025
12 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.

ShardedDaemonProcess DaemonMessageRouter does not support the standard Broadcast message.
2 participants