骆驼标头变量和属性的大小限制 [英] Size Limit of camel header variable and property

查看:53
本文介绍了骆驼标头变量和属性的大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须将请求xml存储到数据库中.我正在使用标头变量来做到这一点.

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

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

它正在处理某些文件,而某些文件却出现异常,这似乎是由于文件大小所致.

it was working for some files And I was getting below exception for some files, it seems like because of the file size.

 413 Request entity too large

所以我通过使用骆驼属性更改了实现,如下所示

So I have changed the implementation by using camel property, like below

exchange.setProperty("inputRequestXml", body);

现在我没有收到例外.但是,恐怕它将在实际的PROD环境中处理更大的文件.所以我想知道,大小是多少 标头变量和属性的限制?

Now I am not getting the exception. But I am afraid that will it handle the bigger files in actual PROD environment. So i want to know, What would be the size limit of header variable and property?

推荐答案

Apache Camel对标头和属性没有限制.与其他对象一样,它受Java堆大小的限制.

Apache Camel has no limit on Headers and Properties. It is limited by Java heap size, as every other object.

您发布的错误是HTTP错误,您可能正在通过HTTP发送该错误,并且远程服务器返回了此错误. Apache Camel将Message#headers转换为HTTP标头,并且您已超出服务器上配置的大小限制.

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.

请参阅: http标题值的最大值?

切换到属性是可行的,因为属性不是通过HTTP传输的.您可能对端点选项 copyHeaders=false

Switching to Properties worked, because Properties are not tranferred over HTTP. You might be interested in endpoint options copyHeaders=false and headerFilterStrategy

这篇关于骆驼标头变量和属性的大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆