-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Implement Sharding.Delivery bypass feature #7106
Implement Sharding.Delivery bypass feature #7106
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
} | ||
else | ||
{ | ||
_log.Warning($"Message unhandled [{msg}]. If you need to pass this message to the consumer sharding entity actor, set \"akka.reliable-delivery.sharding.consumer-controller.allow-bypass\" to true"); |
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.
Log a warning when a message was unhandled, informing the user that they can allow this message to be forwarded if they set allow-bypass
to true
# Allow arbitrary message to be directly sent to the customer actor, | ||
# this lets you use custom handoff messages to be used along side with | ||
# cluster sharding reliable delivery | ||
allow-bypass = false |
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.
New HOCON settings
settings: Settings.Value.WithRole(null), | ||
messageExtractor: new MessageExtractor(), | ||
allocationStrategy: ShardAllocationStrategy.LeastShardAllocationStrategy(absoluteLimit: 2, relativeLimit: 1.0), | ||
handOffStopMessage: SlowStopConsumerEntity.Stop.Instance); |
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.
This would not work without the new allow-bypass
feature
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
Changed `.Tell` to `.Forward`
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 - fixed my own suggestions
settings: Settings.Value.WithRole(null), | ||
messageExtractor: new MessageExtractor(), | ||
allocationStrategy: ShardAllocationStrategy.LeastShardAllocationStrategy(absoluteLimit: 2, relativeLimit: 1.0), | ||
handOffStopMessage: SlowStopConsumerEntity.Stop.Instance); |
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
Fixes #7089
Changes
Implements a bypass mechanism for Akka.Cluster.Sharding.Delivery needed for custom sharding handoff stop to work under sharding delivery.
To turn this feature on, set "akka.reliable-delivery.sharding.consumer-controller.allow-bypass" to true.