Hi,

In the sample both messages are sent from the same context to the same 
receiver, so they will be received in-order.

Tal


On Tuesday, September 6, 2016 at 7:12:32 PM UTC+3, que...@gmail.com wrote:
>
> The order that they are received would be the critical thing, I would 
> think. So, is the example not dealing with the possibility that the 
> messages could be received out of order? Or, is this somehow taken care of?
>
> Kendall
>
> On Monday, September 5, 2016 at 2:40:34 AM UTC-7, Tal Pressman wrote:
>>
>> Hi,
>>
>> Message ordering is preserved between a sender-receiver pair. However, 
>> this refers to the actual actual actor sending the message, regardless of 
>> the ActorRef passed as the sender reference.
>> In the example above, both messages are being sent from the same context, 
>> and therefor should be sent in-order.
>>
>> Tal
>>
>>
>> On Saturday, September 3, 2016 at 8:19:33 AM UTC+3, que...@gmail.com 
>> wrote:
>>>
>>> I'm early in learning Akka. The hello-akka-java8 tutorial has 
>>> greeter.tell from no actor, followed by inbox.send:
>>>
>>> final ActorRef greeter = system.actorOf(Props.create(Greeter.class), 
>>> "greeter");
>>> final Inbox inbox = Inbox.create(system);
>>> greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());
>>> inbox.send(greeter, new Greet());
>>> Greeting greeting1 = (Greeting) inbox.receive(Duration.create(5, 
>>> TimeUnit.SECONDS));
>>>
>>> Can I expect that the greeter actor is going to process new 
>>> WhoToGreet("akka"), before new Greet()?
>>>
>>> If so, why?
>>>
>>> I read in Akka documentation:
>>>
>>> "*...for a given pair of actors, messages sent directly from the first 
>>> to the second will not be received out-of-order.* The word *directly* 
>>> emphasizes 
>>> that this guarantee only applies when sending with the telloperator to 
>>> the final destination, not when employing mediators or other message 
>>> dissemination features (unless stated otherwise)."
>>>
>>> I think the tutorial is not sending messages from one actor.
>>>
>>>
>>>

-- 
>>>>>>>>>>      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