Hi, Sorry for the confusion, I made my message a bit too concise: Indeed, the workers start by sending a "Ready" message and they Ack the work once it's done, after which they start over with a new "Ready".
The problem is that at startup, all my workers are ready and they each request a piece of (heavy) workload. The dispatcher tries to distribute the workload to all these workers, and since sending is asynchronous, it ends up buffering all these messages being sent, so it runs out of heap before the messages can leave the JVM. On Monday, February 24, 2014 5:20:57 PM UTC+1, Akka Team wrote: > > Hi Arjun, > > The classical pull behavior would be the workers sending requests for new > jobs when they are available for work (periodically if needed). Is there a > reason why you reversed this relation? > > > My problem is to limit the parallelization of the outgoing messages: as >> the number of clients increases, my dispacther is trying to send as many >> workload messages in parallel and I end up with an OutOfMemoryError. >> > > You can use either the throttler from akka-contrib > http://doc.akka.io/docs/akka/2.3.0-RC4/contrib/throttle.html#introductionand > modify it as you see fit, or you can send acknowledgements from the > workers when they successfully received the work (it is good practice > anyway!) and stop producing work if there are too many unacknowledged > dispatched work. > > -Endre > > >> >> My understanding is that we can configure the "input" mailboxes of >> actors, but here there's never more than one item in my recipient's >> mailbox, it's the number of recipients that grows, and I want to make sure >> I don't send more than one message at a time (or at least not more than >> what my memory can handle!) >> >> Is there a way ton configure or override this in Akka? >> >> Thanks, >> Arjun >> >> -- >> >>>>>>>>>> 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. >> > > > > -- > Akka Team > Typesafe - The software stack for applications that scale > Blog: letitcrash.com > Twitter: @akkateam > -- >>>>>>>>>> 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.
