Re: [akka-user] How to reference an existing actor?

2016-11-03 Thread Harinath Mallepally
Thanks Rafal for the clarification sure, I think, I will go with 1st one, On Wed, Nov 2, 2016 at 3:52 PM, Rafał Krzewski wrote: > W dniu środa, 2 listopada 2016 18:28:22 UTC+1 użytkownik Harinath > Mallepally napisał: >> >> Hi Rafal, >> >> How do I get to stop my actor, if i want to? looks l

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Rafał Krzewski
W dniu środa, 2 listopada 2016 18:28:22 UTC+1 użytkownik Harinath Mallepally napisał: > > Hi Rafal, > > How do I get to stop my actor, if i want to? looks like I don't see an > option. we have defined actors that do certain activities when ordered to > do so and have life cycle, so we create and

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Justin du coeur
On Wed, Nov 2, 2016 at 3:15 PM, Harinath Mallepally wrote: > If I got it right, this works perfectly fine as long as the consumer is > also a actor, how about doing this from outside of akka? I mean the > invocation of actor.tell happens outside of the akka? > That is exactly where "ask()" is he

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Harinath Mallepally
Thanks, If I got it right, this works perfectly fine as long as the consumer is also a actor, how about doing this from outside of akka? I mean the invocation of actor.tell happens outside of the akka? is it correct to say,If i am sure that my ActorSelection path is correct (an actor is created w

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Justin du coeur
On Wed, Nov 2, 2016 at 1:28 PM, Harinath Mallepally wrote: > the ActorSystem.stop takes a ActorRef as input and not ActorSelection. > Also [1] says we preferable method to communicate with Actor is through > ActorRef and not through ActorSelection is this correct? > That's correct. The key here

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Harinath Mallepally
Hi Rafal, How do I get to stop my actor, if i want to? looks like I don't see an option. we have defined actors that do certain activities when ordered to do so and have life cycle, so we create and then when we are done with it, we are stopping too. trying to avoid use deprecated methods now. t

Re: [akka-user] How to reference an existing actor?

2016-11-01 Thread Harinath Mallepally
Thanks, let me digest this. :-). On Tue, Nov 1, 2016 at 3:48 PM, Rafał Krzewski wrote: > W dniu wtorek, 1 listopada 2016 23:38:22 UTC+1 użytkownik Harinath > Mallepally napisał: >> >> Thanks for the response, >> >> another question: >> How will I know that message is not delivered to the actor?

Re: [akka-user] How to reference an existing actor?

2016-11-01 Thread Rafał Krzewski
W dniu wtorek, 1 listopada 2016 23:38:22 UTC+1 użytkownik Harinath Mallepally napisał: > > Thanks for the response, > > another question: > How will I know that message is not delivered to the actor? > > You will not. You may know that the message WAS delivered if the recipient sends back a repl

Re: [akka-user] How to reference an existing actor?

2016-11-01 Thread Harinath Mallepally
Thanks for the response, another question: How will I know that message is not delivered to the actor? On Tue, Nov 1, 2016 at 2:55 PM, Justin du coeur wrote: > On Tue, Nov 1, 2016 at 5:18 PM, Harinath Mallepally > wrote: > >> ActorSelection selection = system.actorSelection("/user/h >> ello

Re: [akka-user] How to reference an existing actor?

2016-11-01 Thread Justin du coeur
On Tue, Nov 1, 2016 at 5:18 PM, Harinath Mallepally wrote: > ActorSelection selection = system.actorSelection("/user/ > helloWorld_wrong"); > > //this is not null, shouldn't this be null? > System.out.println(selection); > No, I think you're misunderstanding. An ActorSelection is (effectively)

Re: [akka-user] How to reference an existing actor?

2016-11-01 Thread Harinath Mallepally
Hi, I tried to use this earlier (the actorSelection) but didn't know how to handle a wrong path. I wanted to use the logic to initialize the actor if it doesn't exist. This is what I tried with ActorSystem system = ActorSystem.create("Hello"); ActorRef a = system.actorOf(Props.create(HelloW

Re: [akka-user] How to reference an existing actor?

2016-11-01 Thread Patrik Nordwall
Use ActorSelection: http://doc.akka.io/docs/akka/2.4/java/untyped-actors.html#Identifying_Actors_via_Actor_Selection On Mon, Oct 31, 2016 at 7:30 PM, Harinath Mallepally wrote: > Hi, > > I am using this deprecated method for referencing existing actor, is this > the right approach? given that I

[akka-user] How to reference an existing actor?

2016-10-31 Thread Harinath Mallepally
Hi, I am using this deprecated method for referencing existing actor, is this the right approach? given that I have created a actor with a unique name, I want to reference is so that I can use it. ActorRef actor = actorSystem.actorFor(actorSystem.child() I always get not null value even if th