Camel streaming splitter for large json files

跟風遠走 提交于 2019-12-05 08:33:41

问题


Does camel have support for streaming splitting of large JSON data? I know that the support is there for xml. I tried splitting large json files with jsonpathexpression. It worked fine with small files but gives OOM exception with large files.

JsonPathExpression jsonPathExpression = new JsonPathExpression("$.");


 from("stream:hxxp://dummy:5984/test/a123/p.txt")
                        .split(jsonPathExpression).streaming().parallelProcessing()
                        .process(new Processor() {
                            @Override
                            public void process(Exchange exchange) throws Exception {
                                String s = exchange.getIn().getBody(String.class);
                            }
                        })});

来源:https://stackoverflow.com/questions/23408904/camel-streaming-splitter-for-large-json-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!