I'm having trouble sending messages to an ActorProcessor and I'm wondering 
if I'm sending it messages correctly. The actor's onReceive() method looks 
something like this:

public class ActorProcessor extends UntypedProcessor {
    ...
    @Override
    public void onReceive(Object message) {
        if (message instanceof Persistent) {
            ...
        }
    }
    ...
}

so it only accepts Persistent messages. Now my question is, should I be 
sending it messages like this where I only wrap the payload in a Persistent 
object that the ActorProcessor receives?:

shardRegion.tell(new ShardMessage(Persistent.create(props), id), self());

*note - in this case my MessageExtractor will use the first parameter of 
ShardMessage 
as the entryMessage

Or should the entire message that I send it be wrapped in a Persistent 
object?:

shardRegion.tell(Persistent.create(new ShardMessage(props, id)), self());

-- 
>>>>>>>>>>      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 [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/d/optout.

Reply via email to