Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-23 Thread Tim Moore
I think your problem is the implicit sender. When you call actor2 ! Msg1() from inside your Actor1 receiver, it sends the Actor1 ref as the implicit sender. Then, then Actor2 replies to the sender, it goes back to the same Actor1 instance. When you call actor2 ! Msg1() from inside the

Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-23 Thread Konrad “ktoso” Malawski
This is not a 24h/7d support channel, wait a bit ;-) Thanks. -- Cheers, Konrad 'ktoso ' Malawski Akka @ Lightbend On February 23, 2018 at 17:34:30, Kanwaljeet Singh (ksachd...@gmail.com) wrote: Any pointers Konrad? On Thu, Feb 22, 2018,

Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-23 Thread Kanwaljeet Singh
Any pointers Konrad? On Thu, Feb 22, 2018, 11:59 PM Kanwaljeet Singh wrote: > In my current code u feel that it is cyclic dependency because you see > actor1 having access to failedService bean and actor2. But in reality, I > can just remove actor2 being injected into

Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-23 Thread Kanwaljeet Singh
In my current code u feel that it is cyclic dependency because you see actor1 having access to failedService bean and actor2. But in reality, I can just remove actor2 being injected into actor1 if I can get away by using failedservice bean. Even if I do that, things remain the same. I have my

Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-22 Thread Konrad “ktoso” Malawski
It is a macwire thing ;-) It hides you made a cyclic dependency. how would you make this work, plain java/scala: val a = new A(requires B!) val b = new B(a /*requires A*/) Hm, A has an issue... val b = new B(requires B) val a = new A(b /*requires B!*/) Hmm, B can’t get A… As simple as that.

Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-22 Thread Kanwaljeet Singh
here is my code class Actor1(failedService: FailedService, actor2: ActorRef @@ Actor2) extends Actor{ override def receive: Receive = { case TriggerActor1() => println("Actor1 triggered from REST controller. Send msg to actor 2") failedService.testSend() //actor2 ! Msg1()

Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-22 Thread Konrad “ktoso” Malawski
The other questions still stand, please make yourself understandable if you need help :) -- Cheers, Konrad 'ktoso ' Malawski Akka @ Lightbend On February 23, 2018 at 16:05:22, ksachd...@gmail.com (ksachd...@gmail.com) wrote: 1.

Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-22 Thread Kanwaljeet Singh
this is nto a macwire question I think. On Thu, Feb 22, 2018 at 11:06 PM Konrad “ktoso” Malawski < konrad.malaw...@lightbend.com> wrote: > I don’t understand what’s going where or how ;-) > Could you share code? > > Also, isn’t this a macwire question? Better to ask on >

Re: [akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-22 Thread Konrad “ktoso” Malawski
I don’t understand what’s going where or how ;-) Could you share code? Also, isn’t this a macwire question? Better to ask on https://github.com/adamw/macwire/issues ? -- Cheers, Konrad 'ktoso ' Malawski Akka @ Lightbend On February 23,

[akka-user] Akka actoreRef with macWire DI, actoreRef is not set

2018-02-22 Thread ksachdev1
1. Scenario 1 - Working scenario - Actor1 -->MyMsg1-->Actor2 - Actor2 MyMsgHandler - Processes message(with Future), does pipeTo to sender with MyMsg2. Works fine, Actor1 recvs MyMsg2 1. Scenario2 - Failing scenario - Actor1 has a bean injected