Thanks for the guidance Patrik.
I have keep reading through the documentation and found this (which is a 
somewhat similar):

http://doc.akka.io/docs/akka/2.4/general/message-delivery-reliability.html

"Actor creation is treated as a message sent from the parent to the child, 
with the same semantics as discussed above. Sending a message to an actor 
in a way which could be reordered with this initial creation message means 
that the message might not arrive because the actor does not exist yet. An 
example where the message might arrive too early would be to create a 
remote-deployed actor R1, send its reference to another remote actor R2 and 
have R2 send a message to R1. An example of well-defined ordering is a 
parent which creates an actor and immediately sends a message to it."

thanks a lot!

El martes, 1 de noviembre de 2016, 5:16:53 (UTC-3), Patrik Nordwall 
escribió:
>
> You must anyway design for that messages may be lost (e.g. implement 
> acknowledgments and resending) and the first messages are no different. You 
> can subscribe to cluster membership events and wait sending until expected 
> nodes are seen as Up, but it's not a guarantee.
>
> Regards,
> Patrik
>
> On Sun, Oct 30, 2016 at 1:41 AM, Federico Jakimowicz <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> I was giving it a try to the akka cluster feature. I made two systems to 
>> say front and backend. Is just for giving it a try, nothing real.
>>
>> On the front end system I have a router that routes messages to actors in 
>> the backend system.
>> The odd thing i found is that if i send a message to the router in the 
>> frontend as soon as it is created ( being the backend system up an 
>> running  ) then the message goes to frontend deadletters.
>> If I add a delay for instance sleep the thread a second before sending a 
>> message then it reaches the backend actor.
>> It seemed to me a bit odd, is this something expected?
>>
>> part of the code in the front end system
>> Cluster.get(system).registerOnMemberUp(new Runnable() {
>>    public void run() {
>>     ActorRef processor = 
>> system.actorOf(Props.create(CommercePaymentActor.class), 
>> "creditCardPaymentActor");
>>     processor.tell("Message from front End", ActorRef.noSender());
>>    }
>>  });
>>
>>
>> ................
>>
>> public class CommercePaymentActor extends UntypedActor {
>>  private final ActorRef creditCardPaymentRouter;
>>   
>>  public CommercePaymentActor() {
>>   creditCardPaymentRouter = 
>> getContext().actorOf(FromConfig.getInstance().props(),
>>          "creditCardPaymentRouter");
>>  }
>>
>>  @Override
>>  public void onReceive(Object event) throws Exception {
>>   Thread.sleep(1000);
>>   creditCardPaymentRouter.tell(event, getSelf());
>>  }
>> }
>> ................
>>
>> the router config:
>>
>> akka.actor.deployment {
>>  /creditCardPaymentActor/creditCardPaymentRouter {
>>    # Router type provided by metrics extension. 
>>    router = "akka.cluster.metrics.AdaptiveLoadBalancingGroup"
>>    metrics-selector = mix
>>    #
>>    routees.paths = ["/user/creditCardPaymentProcessor"]
>>    cluster {
>>      enabled = on
>>      use-role = backend
>>      allow-local-routees = off
>>    }
>>     }
>> }
>>
>> -- 
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
> Twitter: @patriknw
>
>

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to