Re: [akka-user] Chunked response with akka-http 10.x

2017-04-20 Thread 'Michal Borowiecki' via Akka User List
Hi Thibault, I do this kind of thing with Source.fromIterator(...) passing it an iterator obtained from a java stream. In your case, it would look something like: Source source = Source.fromIterator( () -> Stream.generate( ()-> UUID.randomUUID() ).iterator()

[akka-user] Chunked response with akka-http 10.x

2017-04-20 Thread Thibault Meyer
Hi, I trying akka-http (version 10.x) by creating a small API who generate UUID on demand. For a bulk UUID creation (ex: */uuid1/5000* to get 5000 UUID v1), I would like to return a chunked response to avoir building a list of item on memory. >From Play 2.5 I usually using final