Hello Patrik,

registering the router from the outside worked. Thanks man. This I will now 
keep in mind while creating a router.

Amit

On Tuesday, 11 February 2014 18:23:38 UTC+5:30, Patrik Nordwall wrote:
>
> Hi Amit,
>
> I suspect that it is because of the router. I guess that you do the Put 
> from the SubscriberActor, which are child actors of the router, i.e. they 
> have path "/user/subscriberActor/$x"
>
> What happens if you remove the Put from inside SubscriberActor, and 
> instead register the router from the outside, when you create it, i.e.
>
> ActorRef subscriberActor = system.actorOf(Props.create(*SubscriberActor*
> .class).
>   withRouter(new FromConfig()), "*subscriberActor*");
> mediator.tell(new DistributedPubSubMediator.Put(subscriberActor), 
> ActorRef.noSender());
>
> Cheers,
> Patrik
>
>
> On Tue, Feb 11, 2014 at 12:28 PM, Amit Mula <[email protected]<javascript:>
> > wrote:
>
>> hi guys!
>>
>> I am again stuck with a cluster pub sub problem. Recently, I was using 
>> the *Send()* method of *DistributedPubSubMediator *but seems like the 
>> message are not being received by the subscriber.
>>
>> Instead of subscribe, I have used put in the subscriber actor 
>> initialization :
>>
>> mediator.tell(new DistributedPubSubMediator.Put(getSelf()), getSelf());
>>
>>
>> I am creating crating the subscriber actor as a router: 
>>
>> system.actorOf(Props.create(*SubscriberActor*.class).withRouter(new 
>>> FromConfig()), "*subscriberActor*");
>>
>>
>> and I am sending messages to the subscriber actor through the 
>> DistributedPubSubMediator from the publisher actor :
>>
>> Future<Object> someFuture = ask(mediator, new 
>>> DistributedPubSubMediator.Send(*"/user/subscriberActor"*, someMessage 
>>> ,true), timeout);
>>
>>
>> The above strategy works with *Publish() *but can't get it working with* 
>> Send()*. Am I missing something? 
>>
>> Please suggest.
>>
>> Kind regards,
>> Amit
>>
>>  -- 
>> >>>>>>>>>> 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.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
> Twitter: @patriknw
>
>  

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