Hi Florian, with all the waiting and careful initialization that first message should in principle not be lost (and it might be that there is some bug which causes this). That notwithstanding you should always expect messages to be potentially lost, especially when sending over network links. What I mean is that the loss rate should of course be as low as possible under nominal conditions, but things can and will go wrong in a production system and your code needs to be ready for that—I’m not saying that it isn’t (you didn’t show), just a friendly reminder.
Regards, Roland 2 sep 2014 kl. 22:51 skrev Florian Sauter <[email protected]>: > Hi Konrad, > > thanks for your reply and sry for my late response! > > I've set the "allowLocalRoutees" now to false and it's working - better. All > messages - except the first one - are arriving. I have no idea why. > > The DEBUG log (akka.loglevel = "DEBUG") only displayed some regular heartbeat > messages but no additional errors/warning. All my services are started before > any message is sent (a sysout in constructor is displayed on my terminal - > then I wait at least ten seconds before I start the extern calls). > > And again: Do you have any idea? Is there any setting for cluster debugging > which shows > > Greetings and thanks in advance > Flori > > PS: I'm testing my cluster locally on mac os x (akka2.3.5) using multiple > terminals (starting one node with the role master and multiple service role > systems). > > On Thursday, 7 August 2014 12:24:56 UTC+2, Konrad Malawski wrote: > Hi Florian, > welcome to the community :-) > > Your code and design looks fine in general. > > Are you sure the actor /user/service/testtype is actually started before it > gets this message sent? > Since you’re using actor paths (selection) here in this router, messages can > be sent to this path, before there is anyone there to receive the message. > > Other cases would be if the cluster declares the other node as unreachable, > then: > Do you see any other log messages that would indicate that the other note is > determined unreachable perhaps (that would be in the logs)? > Have you tried running with DEBUG level logging, to get more insight what’s > happening in there? > > > > > On Wed, Aug 6, 2014 at 6:24 PM, Florian Sauter <[email protected]> wrote: > Hi! > > First of all: I'm new to akka. I'm trying to implement the following system > using akka-cluster: > > Node1(role="master") > /user/master <- instanceof MasterActor > > Node2(role="service") > /user/service <- instanceof ServiceManager which instantiates the > ServiceTypeManger for a given service type (or use an existing one -> > actorref is stored in a hashmap). > /user/service/testtype/ <- instanceof ServiceTypeManagerActor which > instantiates local services after receiving a StartupService message and > stores them in a hashmap and redirects jobs from master to local services. > /user/service/testtype/service1 <- instanceof Service (kind of worker) > /user/service/testtype/service2 > ... > /user/service/anotherservicetype > /user/service/anotherservicetype/service1 > ... > > Node3(role="service") > /user/service/testtype/ > /user/service/testtype/service1 > /user/service/testtype/service2 > /user/service/testtype/service3 > ... > > The MasterActor can receive Jobs from an extern interface. These jobs should > be routed through an AdaptiveLoadBalancingGroup to a "service"-role node with > the lowest load: > > MasterActor onReceive (if message instanceof Job): > > Iterable<String> routeesPaths = > Collections.singletonList("/user/service/myservicetype"); > AdaptiveLoadBalancingGroup routerGroup = new > AdaptiveLoadBalancingGroup(MixMetricsSelector.getInstance(), routeesPaths); > ClusterRouterGroupSettings settings = new ClusterRouterGroupSettings(100, > routeesPaths, true, "service"); > ClusterRouterGroup group = new ClusterRouterGroup(routerGroup, settings); > ActorRef clusterRouter = getContext().actorOf(group.props(), > "myservicetype-router"); > clusterRouter.tell(job, getSelf()); > > > And it works fine, for at least 1/3 of the jobs. The rest of the jobs is not > delievered. If a message is not delivered the following log message appears: > > > [INFO] [08/06/2014 18:06:40.824] [MySys-akka.actor.default-dispatcher-15] > [akka://MySys/user/service/testtype] Message [example.Job] from > Actor[akka://MySys/user/masterr#-2096779849] to > Actor[akka://MySys/user/service/testtype] was not delivered. > > Do you have any helpful hint? Do I use actors the wrong way? I've read > before, that dead letters appears using the remote function if the actor is > not reachable. But why should my ServiceTypeManager actor not be reachable? > > I've never worked with this actor pattern before so please be considerate. > > Greetings Flori > > > -- > >>>>>>>>>> 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. > > > > -- > Cheers, > Konrad 'ktoso' Malawski > hAkker @ Typesafe > > > > -- > >>>>>>>>>> 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. Dr. Roland Kuhn Akka Tech Lead Typesafe – Reactive apps on the JVM. twitter: @rolandkuhn -- >>>>>>>>>> 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.
