Saturday, February 22, 2014

Camel, cxf:cxfEndpoint and OTRS

When used as an outbound endpoint cxf:cxfEndpoint will use a default threshold of 4096 bytes to start switching from Content-Length based HTTP transfer to Transfer-Encoding: chunked. This behaviour can cause problems if targeted server does not support this behaviour (in particular OTRS/Apache default configuration does not).
Solution: add in Camel configuration file (outside camelContex tag) the following XML snippet:
  <http-conf:conduit name="*.http-conduit">
    <http-conf:client ChunkingThreshold="15000000" />
    <!--http-conf:client ="false" /-->
  </http-conf:conduit>

This will change the default treshold from 4096 bytes  to the value specified in ChunkingThreshold attribute. The most general option of AllowChunking didn't work for me (the outbound endpoint just freezes and no content is sent over the wire)

No comments :

Post a Comment