Yes, that would be perfect for my use case :)
On 4 Nov 2014 12:33, "Björn Antonsson" <[email protected]> wrote:

> Hi,
>
> There is currently a PR #16172 <https://github.com/akka/akka/pull/16172> that
> provides the functionality to define your own Route, (one input multiple
> outputs). You could use that to implement your Either-junction.
>
> B/
>
> On 3 November 2014 at 16:47:48, Luis Ángel Vicente Sánchez (
> [email protected]) wrote:
>
> Indeed, but also the possibility of creating user define vertices is quite
> useful. Right now I have a scala Either, but in others projects we are
> using scalaz Either instead, as it's right biased.
>
> For now what I'm doing is something like this,
>
> FlowGraph { implicit builder =>
>   val broadcast: Broadcast[Either[A, B]] = ...
>
>   source ~> broadcast
>
>   broadcast ~> LeftFlow
>   broadcast ~> RightFlow
> }
>
> LeftFlow and RightFlow are flows that use transform with this helper
> Filter to to work on the left or right side:
>
>  final class DisjunctionFilter[A, B] {
>>  object left extends Transformer[Either[A, B], A] {
>>  override def onNext(element: Either[A, B]): Seq[A] =
>>  element.fold(Seq[A](_), _ => Seq[A]())
>>  }
>>
>>  object right extends Transformer[Either[A, B], B] {
>>  override def onNext(element: Either[A, B]): Seq[B] =
>>  element.fold(_ => Seq[B](), Seq[B](_))
>>  }
>>  }
>>
>
> 2014-11-03 12:36 GMT+00:00 Olli Helenius <[email protected]>:
>
>> Seems like such a vertex would be quite useful even as a built-in in
>> akka-stream.
>>  --
>> >>>>>>>>>> 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.
>>
>
> --
> >>>>>>>>>> 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.
>
>
> --
> Björn Antonsson
> Typesafe <http://typesafe.com/> – Reactive Apps on the JVM
> twitter: @bantonsson <http://twitter.com/#!/bantonsson>
>
>  --
> >>>>>>>>>> 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.
>

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