Hi 

I'm trying to setup publish-subscribe type of relationship between two 
types of actors. To do that I send in an actorSelection into the subscriber 
that in turn sends an Identify message to the publisher to get the 
actorRef. So that I can init death watch and subscribe to events.

The issue I run into is that I have two traits for these types of actors, 
but when I use those the Identify causes a match error. I had a look in the 
Akka source and in the documentation. To me it seems as if I should never 
have to worry about handling AutoReceiveMessages in the first place?

I get the following log line:

mimer-idp [DEBUG] [12/31/2013 01:11:03.778] 
[MimerSystem-akka.actor.default-dispatcher-16] 
[akka://MimerSystem/user/session_repo/publisher] unhandled message from 
Actor[akka://MimerSystem/user/session_client/subscriber#1714660639]: 
Identify
*I included some pseudo code below* to describe the publisher where this 
occurs. I'm suspecting that it has to do with my trait and 
inheritance/stacking. Tried a bunch of different variations but no luck so 
far.

I'm using akka 2.3-M1.

Happy new year! :)
/Magnus

trait Publisher {
 self: Actor with ActorLogging =>

 def events: Actor.Receive

override def receive = {
 ... control messages ...
 case other => events( other ) // delegates to events in implementing class
 }
}

class MyPublisher extends Actor with ActorLogging with Publisher {
 def events: Actor.Receive = {
   case mpsm:MyPublisherSpecificMessage => ...
   case other => unhandled( other )
 }
}

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

Reply via email to