Hi,

Sorry, I’m using http async client 4.1.4.

Thanks,
Joan.


From: Joan grupoventus <joan.balagu...@grupoventus.com> 
Sent: Friday, January 8, 2021 4:57 PM
To: 'Joan ventusproxy' <joan.balagu...@ventusproxy.com>
Subject: Response buffer size

Hello,

I’m using HttpClient 4.5.7. reading responses from a backend through a 
‘HttpAsyncResponseConsumer’ on the ‘consumeContent’ method  in this way:

while ( (numBytesRead = decoder.read(this.bbuf)) > 0 ) {
( . . . )
}

where  this.bbuf = ByteBuffer.allocate(32768);


The buffer size in the async http instance is configured in this way (‘phccm’ 
is  a ‘PoolingNHttpClientConnectionManager’):
this.phccm.setDefaultConnectionConfig(ConnectionConfig.custom().setBufferSize(32768).setFragmentSizeHint(32768).build()

And on the IOReactor:
IOReactorConfig ioReactorConfig = IOReactorConfig.custom().setRcvBufSize(32768) 
...


But when we start reading the response on the consume content method, the byte 
buffer is filled out just with 16K of data:
Cycle 0 :: bytes read = 15812, total size (K) = 15
Cycle 1 :: bytes read = 16368, total size (K) = 31
Cycle 2 :: bytes read = 16376, total size (K) = 47
Cycle 3 :: bytes read = 16384, total size (K) = 63
Cycle 4 :: bytes read = 16376, total size (K) = 79
Cycle 5 :: bytes read = 16384, total size (K) = 95
Cycle 6 :: bytes read = 16376, total size (K) = 111
Cycle 7 :: bytes read = 16384, total size (K) = 127

What am I missing?

Thanks,

Joan.




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to