You might also want to take a look at mapAsync() instead of map() on the
first stage of your flow. I find anything with network I/O in it makes more
sense to run through a mapAsync().

Brian Maso

On Tue, Nov 21, 2017 at 9:27 AM, Julian Howarth <10.howa...@gmail.com>
wrote:

> Take a look at `flatMapConcat` which should do exactly what you need.
>
> Julian
>
>
> On Tuesday, November 21, 2017 at 11:37:58 AM UTC, Владимир Морозов wrote:
>>
>> Hi All!
>> I again have question about Akka Streams, now I have task like: I have
>> `Seq[URL]` to files, need download it, process via some stages and than
>> upload result to different place. When I try to do it use code like this:
>>
>> Source(images.to[scala.collection.immutable.Seq])
>>       .map { image =>
>>         Get(image.uri)
>>       }
>>       .via(httpFlow)
>>       .map { response =>
>>         response.entity.dataBytes: Source[ByteString, Any]
>>       }
>>
>> I get Source inside Stream... and to process it source I need to run
>> Stream inside Stream - I want something like `flatMap` operation that
>> allowed me to operate with `ByteString` from response source in my current
>> stream, not inside other chain
>>
>> Any ideias?
>>
> --
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> 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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to