They are allocated independent of each other and since that can be in
different order they may end up on different nodes.

You can implement your own shard allocation function. The result is
returned in a Future so it can delegate the decision to an actor with ask.
That actor can be the same for both entity types and it can handle the
colocation.

/Patrik
lör 1 juli 2017 kl. 22:41 skrev Andrey Ilinykh <ailin...@gmail.com>:

> Hi everyone!
> I want to shard two different types of actors - A and B. If both shard
> region have the same shard resolver function, does it mean the entities
> with the same shard id but different type run on the same node?
> In other words if total number of shards of type A is the same as the
> total number of shards of type B and some Actor A has the same shard id as
> Actor B. Are Actor A and Actor B running on the same node?
>
> Thank you,
>   Andrey
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to