Size Limit of camel header variable and property

前端 未结 2 1294
野趣味
野趣味 2021-01-25 07:10

I have to store the request xml in to database. I was using header variable to do that.

exchange.getIn().setHeader(\"inputRequestXml\", body);

相关标签:
2条回答
  • 2021-01-25 08:03

    Exchange properties have no limit, its just a HashMap that stores key/values in the memory of the JVM.

    Message headers is also just a HashMap, but headers are part of the message contract, and depending on which Camel components (transports) you use then these headers may be in use, eg HTTP headers, SOAP headers, JMS headers etc. And when so you may have header limitations that are caused by these transports.

    You can find more details and it can be a good idea to read the free chapter 1 of the Camel in Action 2nd edition book which explains the important Camel concepts.

    0 讨论(0)
  • 2021-01-25 08:04

    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

    0 讨论(0)
提交回复
热议问题