I have to store the request xml in to database. I was using header variable to do that.
exchange.getIn().setHeader(\"inputRequestXml\", body);
Apache Camel has no limit on Headers and Properties. It is limited by Java heap size, as every other object.
Error you have posted is HTTP error, you are probably sending it over HTTP and remote server returned this error.
Apache Camel translates Message#headers
as HTTP headers and you have exceeded size limit configured on server.
See: Maximum on http header values?
Switching to Properties worked, because Properties are not tranferred over HTTP. You might be interested in endpoint options copyHeaders=false and headerFilterStrategy