• <i id='6nLVs'><tr id='6nLVs'><dt id='6nLVs'><q id='6nLVs'><span id='6nLVs'><b id='6nLVs'><form id='6nLVs'><ins id='6nLVs'></ins><ul id='6nLVs'></ul><sub id='6nLVs'></sub></form><legend id='6nLVs'></legend><bdo id='6nLVs'><pre id='6nLVs'><center id='6nLVs'></center></pre></bdo></b><th id='6nLVs'></th></span></q></dt></tr></i><div id='6nLVs'><tfoot id='6nLVs'></tfoot><dl id='6nLVs'><fieldset id='6nLVs'></fieldset></dl></div>
  • <tfoot id='6nLVs'></tfoot>

          <bdo id='6nLVs'></bdo><ul id='6nLVs'></ul>

        <small id='6nLVs'></small><noframes id='6nLVs'>

        <legend id='6nLVs'><style id='6nLVs'><dir id='6nLVs'><q id='6nLVs'></q></dir></style></legend>

        Camel JDBC StreamList 查询似乎在拆分之前加载整个结

        时间:2023-08-21

            <bdo id='VUshh'></bdo><ul id='VUshh'></ul>
              <legend id='VUshh'><style id='VUshh'><dir id='VUshh'><q id='VUshh'></q></dir></style></legend>
              <i id='VUshh'><tr id='VUshh'><dt id='VUshh'><q id='VUshh'><span id='VUshh'><b id='VUshh'><form id='VUshh'><ins id='VUshh'></ins><ul id='VUshh'></ul><sub id='VUshh'></sub></form><legend id='VUshh'></legend><bdo id='VUshh'><pre id='VUshh'><center id='VUshh'></center></pre></bdo></b><th id='VUshh'></th></span></q></dt></tr></i><div id='VUshh'><tfoot id='VUshh'></tfoot><dl id='VUshh'><fieldset id='VUshh'></fieldset></dl></div>

              <tfoot id='VUshh'></tfoot>
                <tbody id='VUshh'></tbody>

                  <small id='VUshh'></small><noframes id='VUshh'>

                1. 本文介绍了Camel JDBC StreamList 查询似乎在拆分之前加载整个结果集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在运行一个 SQL 使用者来读取表中的更改,这一切都很好.但是,有时会发生大量更改,然后我的查询因内存不足错误而中断,如您所料.

                  I'm running a SQL consumer to read changes from a table, which is all well and good. However, there are occasions where changes happen on mass, and then my query breaks with out of memory error, as you might expect.

                  不幸的是,我被困在 Camel 2.17.6 上,所以 SQL 组件的 StreamList 选项不可用.(虽然根据 Camel-SQL 为什么使用 StreamList 似乎加载所有 ResultSet? 由于 Spring JDBC 限制,这不能用作流列表.)

                  Unfortunately, I'm stuck on Camel 2.17.6, so the StreamList option for the SQL component isn't available. (Although according to Camel-SQL Why using StreamList seems to load all ResultSet? this doesn't work as a stream list due to Spring JDBC limitations.)

                  因此,我使用支持流列表的 JDBC 组件重新编写了我的路由,并且一旦我增加要提取的记录数,我仍然会出现内存不足异常.似乎出于某种原因,JDBC 组件试图在传递给拆分器之前提取所有记录.

                  So I've re-written my route using the JDBC component, which supports a stream list, and I'm still getting out of memory exceptions as soon as I increase the number of records to extract. It would appear that for some reason, the JDBC component is trying to extract all the records before passing to the splitter.

                  我现在的形式是:

                  from("timer:timer...")
                    .to( "language:constant:resource:classpath:pathToSqlStatement/sqlStatement.sql" )
                    .to( "jdbc:msSqlServerDataSource?outputType=StreamList" )
                    .split( body() ).streaming()
                    .setBody().simple("$body[XMLDOC]")
                    .setHeader("HeaderName").xpath("xpath/to/data")
                    .to("jms:topic:name");
                  

                  我最初确实有一个聚合策略 UseLatestAggregationStrategysplit() 之后的一个额外步骤,但我已经把它去掉了,试图删除所有可能的导致整个查询被保存在内存中,但我看不到我现在还能做什么.

                  I did originally have an aggregation strategy UseLatestAggregationStrategy and an extra step after the split() but I've stripped that out in an attempt to remove everything that could possibly result in the whole query being held in memory, but I can't see what else I can do now.

                  我注意到问题 camel jdbc 内存不足异常 引发了类似的问题,而且似乎没有解决办法.

                  I note the question camel jdbc out of memory exception raises a similar problem, and didn't appear to have a resolution.

                  (我应该注意到我遇到的内存不足错误确实出现在不同的地方,并且在 WinNTFileSystem 中包含了 GC 开销限制超过,我没有理解,还有其他与 ZippedInputStream 有关的事情,我又不明白.)

                  (I should note that the out of memory errors I've had do appear in different places, and included GC overhead limit exceeded at WinNTFileSystem which I don't understand, and something else to do with a ZippedInputStream, which again I don't understand.)

                  这是否意味着 StreamList 也不适用于 JDBC 组件,或者我必须做一些特定的事情来确保 JDBC 组件不会尝试缓存整个结果?

                  Does that mean that StreamList doesn't work on the JDBC component either, or do I have to do something specific to ensure that the JDBC component doesn't try to cache the whole results?

                  推荐答案

                  StreamList 从 v.18.x 版本开始,camel-sql 支持输出类型.在早期版本中,camel-sql 组件加载 内存中的结果集作为列表.我认为在camel-sql 2.17.x版本中无法避免.

                  StreamList output type is supported in camel-sql since version v.18.x. In earlier version, camel-sql component load the result set in memory as list. I don't think it can be avoided in camel-sql version 2.17.x.

                  camel-sql 组件将结果加载到内存中后,聚合/拆分确实适用.

                  Aggregation /splitting does apply after loading the result in memory by camel-sql component.

                  另一个相关答案.

                  这篇关于Camel JDBC StreamList 查询似乎在拆分之前加载整个结果集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:以 IBM MQ 和 Oracle 为资源的独立 Spring 应用程序 下一篇:SQLite 参数 - 不允许表名作为参数

                  相关文章

                  最新文章

                  <small id='fpWNr'></small><noframes id='fpWNr'>

                    <tfoot id='fpWNr'></tfoot><legend id='fpWNr'><style id='fpWNr'><dir id='fpWNr'><q id='fpWNr'></q></dir></style></legend>
                      • <bdo id='fpWNr'></bdo><ul id='fpWNr'></ul>
                    1. <i id='fpWNr'><tr id='fpWNr'><dt id='fpWNr'><q id='fpWNr'><span id='fpWNr'><b id='fpWNr'><form id='fpWNr'><ins id='fpWNr'></ins><ul id='fpWNr'></ul><sub id='fpWNr'></sub></form><legend id='fpWNr'></legend><bdo id='fpWNr'><pre id='fpWNr'><center id='fpWNr'></center></pre></bdo></b><th id='fpWNr'></th></span></q></dt></tr></i><div id='fpWNr'><tfoot id='fpWNr'></tfoot><dl id='fpWNr'><fieldset id='fpWNr'></fieldset></dl></div>