Hi Tal,

The settings you reference are only about the maximum sizes before the
client fails rather than returning the response, it cannot affect how large
chunks the server returns. Additionally the the OS on the sending side,
network devices between the client and server and the receiving client can
make the chunks smaller.

Can you tell us a bit more about why you want larger chunks and maybe it
will be easier to give you some ideas about how you can achieve that?

--
Johan
Akka Team


On Wed, Sep 7, 2016 at 11:27 PM, Tal Beno <[email protected]> wrote:

> I am reading an HTTP Response stream from a URL. The response runForeach
> returns a stream of small chunks. I want to increase the chunk size.
>
>
> I have an application.conf file where I experimented with the following
> (increasing default values), but nothing changed. Wasn't sure which config
> param is the one I need. I must be doing something wrong.
>
>
> application.conf:
>
>
> akka.http.host-connection-pool.client.parsing.max-chunk-size=50m
> akka.http.host-connection-pool.client.parsing.max-chunk-ext-length=50m
> akka.http.host-connection-pool.client.parsing.max-content-length=50m
>
>
> my code:
>
>
> var config: Config = ConfigFactory.load()
> implicit val system = ActorSystem("test", config)import 
> system.dispatcherimplicit val materializer = ActorMaterializer()
> val responseFuture: Future[HttpResponse] = 
> Http().singleRequest(HttpRequest(uri = source))
>
> responseFuture.flatMap { response =>
>    val responseData = response.entity.dataBytes
>    responseData.runForeach(chunk => {
>      println(s"CHUNK:${chunk}")
>    })}
>
>
> Thank you.
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c
> urrent/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.

Reply via email to