You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by cxf-fan <mo...@hotmail.com> on 2012/10/10 11:40:21 UTC
Apache CXF chunk size
Hi,
Can someone tell me what's the equivalent in Apache CXF of
JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE ?
Thanks
--
View this message in context: http://cxf.547215.n5.nabble.com/Apache-CXF-chunk-size-tp5716244.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Apache CXF chunk size
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Actually for the http conduit, the default chunk size is 8K, for the new async http conduit which is introduced by the new http-hc module, the default chunk size is 16k.
NOTE, the new http-hc module only exist in latest CXF 2.7.
I'm now working on to make both of them settable.
-------------
Freeman(Yue) Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
On 2012-10-15, at 下午3:57, cxf-fan wrote:
> Hi,
>
> Thanks for the replies.
>
> So CXF by default uses *16k as chunking size* , (i don't think its shy by
> the way , because with this value i can reach the limit of hard disk copy
> speed)
>
> Anyway , you answerd my question.
>
> Thanks to both of you.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Apache-CXF-chunk-size-tp5716244p5716602.html
> Sent from the cxf-user mailing list archive at Nabble.com.
Re: Apache CXF chunk size
Posted by cxf-fan <mo...@hotmail.com>.
Hi,
Thanks for the replies.
So CXF by default uses *16k as chunking size* , (i don't think its shy by
the way , because with this value i can reach the limit of hard disk copy
speed)
Anyway , you answerd my question.
Thanks to both of you.
--
View this message in context: http://cxf.547215.n5.nabble.com/Apache-CXF-chunk-size-tp5716244p5716602.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Apache CXF chunk size
Posted by Freeman Fang <fr...@gmail.com>.
Sure, I'll also take care of it.
-------------
Freeman Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
On 2012-10-11, at 上午10:47, Daniel Kulp wrote:
>
> On Oct 10, 2012, at 9:50 PM, Freeman Fang <fr...@gmail.com> wrote:
>
>> Hi,
>>
>> Sorry I misunderstand your question.
>>
>> No, currently CXF just set -1 setChunkedStreamingMode(-1) to use HttpURLConnection default chunk size, generally 8K, users can't specify it.
>>
>> Anyway, I think we can make an improvement for this part, I'll create a jira to track it.
>
> The new async HTTP transport uses a default of just shy of 16K. Not settable right now though. That would need to be updated as well.
>
> Dan
>
>
>> -------------
>> Freeman Fang
>>
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Web: http://fusesource.com | http://www.redhat.com/
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>> http://blog.sina.com.cn/u/1473905042
>> weibo: http://weibo.com/u/1473905042
>>
>> On 2012-10-10, at 下午9:41, cxf-fan wrote:
>>
>>> Hi Freeman,
>>>
>>> Thanks for the reply.
>>>
>>> I don't think it's the same variable because :
>>>
>>> *JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE* :The number of bytes to
>>> write in each chunk
>>>
>>> http://docs.oracle.com/javase/1.5.0/docs/api/java/net/HttpURLConnection.html?is-external=true#setChunkedStreamingMode%28int%29
>>>
>>> while
>>>
>>> *httpClientPolicy.setChunkingThreshold* : Specifies the threshold at which
>>> CXF will switch from non-chunking to chunking. By default, messages less
>>> than 4K are buffered and sent non-chunked. Once this threshold is reached,
>>> the message is chunked.
>>>
>>>
>>> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
>>>
>>>
>>>
>>> --
>>> View this message in context: http://cxf.547215.n5.nabble.com/Apache-CXF-chunk-size-tp5716244p5716274.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
Re: Apache CXF chunk size
Posted by Daniel Kulp <dk...@apache.org>.
On Oct 10, 2012, at 9:50 PM, Freeman Fang <fr...@gmail.com> wrote:
> Hi,
>
> Sorry I misunderstand your question.
>
> No, currently CXF just set -1 setChunkedStreamingMode(-1) to use HttpURLConnection default chunk size, generally 8K, users can't specify it.
>
> Anyway, I think we can make an improvement for this part, I'll create a jira to track it.
The new async HTTP transport uses a default of just shy of 16K. Not settable right now though. That would need to be updated as well.
Dan
> -------------
> Freeman Fang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://fusesource.com | http://www.redhat.com/
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: http://weibo.com/u/1473905042
>
> On 2012-10-10, at 下午9:41, cxf-fan wrote:
>
>> Hi Freeman,
>>
>> Thanks for the reply.
>>
>> I don't think it's the same variable because :
>>
>> *JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE* :The number of bytes to
>> write in each chunk
>>
>> http://docs.oracle.com/javase/1.5.0/docs/api/java/net/HttpURLConnection.html?is-external=true#setChunkedStreamingMode%28int%29
>>
>> while
>>
>> *httpClientPolicy.setChunkingThreshold* : Specifies the threshold at which
>> CXF will switch from non-chunking to chunking. By default, messages less
>> than 4K are buffered and sent non-chunked. Once this threshold is reached,
>> the message is chunked.
>>
>>
>> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
>>
>>
>>
>> --
>> View this message in context: http://cxf.547215.n5.nabble.com/Apache-CXF-chunk-size-tp5716244p5716274.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Apache CXF chunk size
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Sorry I misunderstand your question.
No, currently CXF just set -1 setChunkedStreamingMode(-1) to use HttpURLConnection default chunk size, generally 8K, users can't specify it.
Anyway, I think we can make an improvement for this part, I'll create a jira to track it.
-------------
Freeman Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
On 2012-10-10, at 下午9:41, cxf-fan wrote:
> Hi Freeman,
>
> Thanks for the reply.
>
> I don't think it's the same variable because :
>
> *JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE* :The number of bytes to
> write in each chunk
>
> http://docs.oracle.com/javase/1.5.0/docs/api/java/net/HttpURLConnection.html?is-external=true#setChunkedStreamingMode%28int%29
>
> while
>
> *httpClientPolicy.setChunkingThreshold* : Specifies the threshold at which
> CXF will switch from non-chunking to chunking. By default, messages less
> than 4K are buffered and sent non-chunked. Once this threshold is reached,
> the message is chunked.
>
>
> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Apache-CXF-chunk-size-tp5716244p5716274.html
> Sent from the cxf-user mailing list archive at Nabble.com.
Re: Apache CXF chunk size
Posted by cxf-fan <mo...@hotmail.com>.
Hi Freeman,
Thanks for the reply.
I don't think it's the same variable because :
*JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE* :The number of bytes to
write in each chunk
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/HttpURLConnection.html?is-external=true#setChunkedStreamingMode%28int%29
while
*httpClientPolicy.setChunkingThreshold* : Specifies the threshold at which
CXF will switch from non-chunking to chunking. By default, messages less
than 4K are buffered and sent non-chunked. Once this threshold is reached,
the message is chunked.
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
--
View this message in context: http://cxf.547215.n5.nabble.com/Apache-CXF-chunk-size-tp5716244p5716274.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Apache CXF chunk size
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
There is a ChunkingThreshold which default value is 4096, you can configure it for http:conduit, take a look at [1] to get more details.
[1]http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
-------------
Freeman Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
On 2012-10-10, at 下午5:40, cxf-fan wrote:
> Hi,
>
> Can someone tell me what's the equivalent in Apache CXF of
> JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE ?
>
> Thanks
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Apache-CXF-chunk-size-tp5716244.html
> Sent from the cxf-user mailing list archive at Nabble.com.