On Thu, Apr 16, 2015 at 4:59 PM, Eugene Dzhurinsky <[email protected]> wrote:
> After I got some more time for investigation, things became clear: > > First of all, when I run my test on slow machine, when the test fails - I > can see the following dead messages in logs: > > 2015-04-16 10:46:01,464 INFO > [RemoteActorRefProvider$RemoteDeadLetterActorRef] Message > [akka.cluster.InternalClusterAction$InitJoin$] from > Actor[akka://HttpCluster/system/cluster/core/daemon/joinSeedNodeProcess-1#766083442] > to Actor[akka://HttpCluster/deadLetters] was not delivered. [1] dead > letters encountered. This logging can be turned off or adjusted with > configuration settings 'akka.log-dead-letters' and > 'akka.log-dead-letters-during-shutdown'. > > It seems that the cluster system hasn't started yet, so the association is > not possible. > > Now, I see lots of the following messages: > > 2015-04-16 10:46:11,791 INFO [EmptyLocalActorRef] Message > [akka.contrib.pattern.DistributedPubSubMediator$Internal$Status] from > Actor[akka.tcp:// > [email protected]:12551/user/distributedPubSubMediator#1362726323] to > Actor[akka://HttpCluster/user/distributedPubSubMediator] was not delivered. > [3] dead letters encountered. This logging can be turned off or adjusted > with configuration settings 'akka.log-dead-letters' and > 'akka.log-dead-letters-during-shutdown' > > When running this test locally, I see no errors like that, so I assume > that this is the trite timings problem. > > Shall I instantiate an instance of *DistributedPubSubMediator* after the > cluster is up and got all it's associations? And why it doesn't connect > upon the cluster is set up? And what is the best way to start all mediators > and stuff upon all cluster members had joined the cluster? > Information about the registered subscribers are eventually replicated to other nodes. That may take a while (a few seconds) and if you publish something to a topic before the subscriber information has been replicated to the node of the publisher the message will not be sent to the subscriber. It is recommended to load the extension when the actor system is started by defining it in akka.extensions configuration property. Otherwise it will be activated when first used and then it takes a while for it to be populated. akka.extensions = ["akka.contrib.pattern.DistributedPubSubExtension"] You must design for that the messages will not always be delivered, and that is especially the case when starting up and registering the subscribers to the DistributedPubSubMediator. Regards, Patrik > > Thanks! > > -- > >>>>>>>>>> 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. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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.
