Hi,
How do I do an ask with a Shard Region? Currently, I am asking the entity reference directly as shown below.
val sharding = ClusterSharding(system)
val shardRegion = sharding.init(Entity(ShoppingCartActor.TypeKey)(createBehavior = entityContext => ShoppingCartActor()))
def addItem(id: String, quantity: Int) : Future[CartState] = {
val entityRef = sharding.entityRefFor(ShoppingCartActor.TypeKey, "Cart")
entityRef ? (ShoppingCartActor.AddItem(id, quantity, _))
}
Kind regards