I change to send each actor with a ping message, waiting their ack back. That looks working now.
Thanks. Björn Antonsson於 2014年3月5日星期三UTC+8下午4時19分03秒寫道: > > Hi, > > On 3 March 2014 at 06:43:35, lee json ([email protected] <javascript:>) > wrote: > > I know I can lookup an actor by sending an Identify message, waiting > target to reply ActorIdentity(`path`, Some(actor)) > > Now I have multiple actors that I want to lookup in the same jvm. > 1. How can I distinguish Timeout between two or multiple actors? > > > Are you asking about using wildcards in your ActorPaths, or only sending > Identify(messageId) to multiple paths? > > If you’re just sending to multiple paths, you can use resolveOne multiple > times in sequence, or create unique messageIds for each actor, to correlate > the answers. > > If you are using wildcards and don’t know the number of replies you are > expecting, then you have to decide when you’ve got enough replies. > > > > 2. Does the logic in identifying section looks correct for receiving > different actors replying ActorIdentity? Or what is the correct pattern to > lookup multiple actors? > http://paste.debian.net/85009/ > > > So the link doesn’t work for me, so I can’t comment on that code. > > B/ > > Thanks > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: http://akka.io/faq/ > >>>>>>>>>> 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 http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > Björn Antonsson > Typesafe <http://typesafe.com/> – Reactive Apps on the JVM > twitter: @bantonsson <http://twitter.com/#!/bantonsson> > > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> 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/groups/opt_out.
