Hopefully I can explain this correctly... I stumbled into code using akka streams that's laid out like this:
- A Kafka source - a flow that partitions decoded kafka messages by a field (Partition graph stage) - to each partition, a Subscriber/Publisher 'Flow' actor gets assigned, that sends messages to other actors spread out throughout a cluster (making the messaging asynchronous?) - then all responses get merged back into one flow (Merge graph stage), so basically, fan-out -> fan-in kind of situation I have a specification that the messages going in the flow need to come out in the exact same order. Assuming that the cluster messaging is asynchronous, I've been looking at ways of solving this. One approach was to wrap around a Flow that tags messages using an incremental "In" counter, buffer responses into a TreeMap/TreeSet and use takeWhile() before delivering, keeping score on the counter so there's no skips. One thing to note is that the message type going in is also the message type going out of the flow, so the incremental count is alway being passed through. I've been looking into MergeSorted and Zip graph stage to keep things simple but from what I see, they either don't guarantee the ordering of the entire flow or impact throughput, but I could be wrong. Any thoughts? -- >>>>>>>>>> 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.
