Hi Akka Team,
I`m wondering which option is a better one to get source from future of http response:
val httpResponse: Future[HttpResponse] = ???
Source.future(httpResponse).flatMapConcat(_.entity.dataBytes) //1
Source.futureSource(httpResponse.map(_.entity.dataBytes)). //2
What i saw was that option 1 can produce warning messages:
java.util.concurrent.TimeoutException: Response entity was not subscribed after 1 second. ...
in case nobody pulls the source for some time.
Regards,
Kyrylo