Rafał, - If I understand onPulI() function correctly, it is allowed only for outlets, so in order to pull something you need to push it in this outlet firstly.
- Balancer has been taken from the docs: Balancing_jobs_to_a_fixed_pool_of_workers <http://doc.akka.io/docs/akka/2.4/java/stream/stream-cookbook.html#Balancing_jobs_to_a_fixed_pool_of_workers> - I don't think that testing will help me, because based on the first statement I would see something in the log. So, messages do not go inside the shape and stuck somewhere between flow and managementFlow. Regards, Sergey четверг, 20 октября 2016 г., 13:52:58 UTC+3 пользователь Rafał Krzewski написал: > > Sergey, > I have a few remarks after cursory reading of your code: > > - Akka Streams (and Reactrive Streams) are pull based. As the messages > travel downstream, virtual demand tokens travel upstream. Each graph > element is allowed to push elements downstream only when demand is > signaled. This means that you must keep track of demand carefully. In a > GraphStage that is flow-shaped (has both inlets and outlets), flow of data > is initiated by a pull on it's outlets. If you fails to propagate such pull > to some (or all) of your GraphStage's inlets things are going to stall. In > your test code, you put debut statements in onPush methods, but you should > also monitor onPull > > - There's something strange with your balancer component. Either I'm > misreading things, or you removed some important details while editing the > code for publication, but it seems to me that each Data input element will > be processed in a dedicated, parallel finderFlow / each finderFlow will > ever see only a single element. This also could be a reason of the "clog" > you experience. > > - In general I would suggest building your flow processing "outwards": > first try to validate that managementFlow works in isolation (unit tests > with Stream Test Kit would be recommended here) and once you have this > settled, build and test large flows progressively. > > Hope that helps, > Rafał > > > -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
