Sounds simple. Unfortunately I haven't been able to make one client talk to
two shard regions in the same time.

Here is a simple example with two shard regions:
https://github.com/dragisak/akka-multi-shard-proxy

I am seeing messages arriving to one shard or to the other. Haven't been
able to achieve expected behavior of messages arriving to all nodes.

Can you take a look to see if I haven't misconfigured something ?

Thanks

On Tue, Apr 7, 2015 at 4:36 AM, Akka Team <[email protected]> wrote:

> Hi,
>
> On Sun, Apr 5, 2015 at 6:05 AM, Dragisa Krsmanovic <[email protected]>
> wrote:
>
>> Hi all,
>>
>> We are trying to implement a microservices architecture based on Akka
>> clustering.
>>
>> Services can be Akka workers or front end apps that call the workers.
>>
>> Some of the services will be using akka persistence for event sourcing.
>> For those, we need to use sharding to assure that persisted actors don't
>> appear on more than one node.
>>
>> Clients - our front end apps, can use shard regions in proxy-only mode to
>> route messages to right worker nodes.
>>
>> Problem comes up when client needs to talk to more than one of these
>> sharded services.
>>
>> Each of these services can form their own shard region by configuring
>> different roles for Akka sharding. In that case, each service will have
>> their own shard coordinator.
>>
>> But, in that case, I don't see a way to create multiple shard proxies on
>> client to talk to different shards. How can I tell my shard proxy to use
>> different shard coordinators ?
>>
>
> AFAIK this is the purpose of the "typeName" parameter on the start()
> method. For different services you can use a different "typeName" String
> and you can just start multiple proxies. Of course the matching services
> will need a matching "typeName" parameter.
>
> -Endre
>
>
>>
>> The workaround has been to use a round-robin router instead of shard
>> proxy which isn't ideal because it causes messages to make additional hops
>> until they reach the destination.
>>
>> Thanks,
>> Dragisa
>>
>>  --
>> >>>>>>>>>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Akka Team
> Typesafe - Reactive apps on the JVM
> Blog: letitcrash.com
> Twitter: @akkateam
>
> --
> >>>>>>>>>> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to