-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Broadcast
message support to ShardedDaemonProcess
#7451
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review
if (message is Broadcast broadcast) | ||
{ | ||
var unwrapped = broadcast.Message; | ||
foreach (var entityId in _entityIds) | ||
{ | ||
_shardingRef.Forward(new ShardingEnvelope(entityId, unwrapped)); | ||
} | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this 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
.
Fixes #7450
Changes
Add
Broadcast
message supportChecklist
For significant changes, please ensure that the following have been completed (delete if not relevant):