SingleAggregateIdSharding
Simple sharding implementation that always routes to a single node.
This implementation ignores the aggregate ID and always returns the same node name. It's useful for scenarios where all aggregates of a certain type should be stored on the same node, or for testing purposes.
Example usage:
val sharding = SingleAggregateIdSharding("primary-node")
val shard1 = sharding.sharding(orderId1) // Returns "primary-node"
val shard2 = sharding.sharding(orderId2) // Returns "primary-node"Content copied to clipboard