Hi Leon,

No, once you broadcast to two streams, they are concurrent and therefore
have no ordering between them. Concurrent processing is the reason to use
streams. If you have ordering requirements, then maybe you don't want
concurrent processing for that step at all?

I.e. why not just do

src.mapConcat {
  if (..) do someStuff
  else do otherStuff
}

The question that you need to ask yourself is exactly the same as with
actors: "do I need a separate actor for this (to exploit parallelism, or
for isolation) or I can execute this as part of this actor?"

-Endre

On Wed, Nov 25, 2015 at 10:24 AM, Leon Ma <[email protected]> wrote:

> Hi,
>
> I have below stream:
>
>
> broadcast ~> filter1  ~> flowA ~> flowB ~> merge
> broadcast ~> filter2 ~> flowC ~> merge
>
> Assuming filter1 and filter2 are exclusive, which means my input element
> will either go upper flow or go down flow.
>
> How can I guarantee the order?
>
> Say I have a source of X, Y, Z,
>
> X goes upper flow, Y and Z goes down flow, if flowC runs much faster than
> flowA + flowB, am I expect to see orders like Y', Z', X' ?
>
>
> Thanks
> Leon
>
>
>
>
>
> --
> >>>>>>>>>> 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.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      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.

Reply via email to