Hi John,
On Wed, Jan 13, 2016 at 4:26 PM, <[email protected]> wrote: > Yes that makes sense and helps me better undnerstand the streams api. > I am struggling right now though. here is my pseudo code > > Flow<Integer, Pair<Try<HttpResponse>, Integer>, BoxedUnit> flow = ....; > > final Flow<Integer, ByteString, BoxedUnit> byteStringFlow = > flow.flatMapConcat(pair -> { > Try<HttpResponse> responseTry = pair.first(); > return responseTry.get().entity().getDataBytes(); > }); > > > I am trying to hold onto the Integer and resulting Bytesring on flow that I > connect to > byteStringFlow. > > I am trying to use viaMat but I cannot find a way to add it to > byteStringFlow.... > > A materialized value is a *single* value for the whole materialization, while in the code above you will have a stream of Integers. What you first need to figure out is how you want to get these, since for one Integer there might be multiple ByteStrings belonging. -Endre > > > > > Am Mittwoch, 13. Januar 2016 16:09:38 UTC+1 schrieb drewhk: >> >> Hi, >> >> How would that work? It is an empty (identity) Flow, therefore it cannot >> cannot change the type of the input to another type since elements are >> unchanged. >> >> You need to add at least one combinator to the flow to change the output >> types. >> >> -Endre >> >> On Wed, Jan 13, 2016 at 4:05 PM, <[email protected]> wrote: >> >>> I know how to create a simple flow: >>> >>> Flow<Integer, Integer, BoxedUnit> flowUniform = Flow.create(); >>> >>> But how-to create a not uniform flow? >>> >>> Flow<Integer, Pair<Try<HttpResponse>, Integer>, BoxedUnit> flowNotUniform = >>> Flow.create(); // this doesn't work >>> >>> Many Greetings John? >>> >>> >>> -- >>> >>>>>>>>>> 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. >>> >> >> -- > >>>>>>>>>> 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. > -- 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
