apache-camel

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

Replacement of Deprecated beanRef() in Camel v2.16.0

99封情书 提交于 2019-12-05 08:16:09
We are upgrading from Camel v2.13 to v2.16 and discovered that beanRef() has been marked as deprecated. What is the replacement/alternative recommended by Apache Camel. I was unable to find anything useful on Camel v2.16.0 Documentation site. Even updated examples are not yet available. beanRef() is syntax within Java DSL Bean Language of Camel. I assume that you are talking about the ProcessorDefinition class. The javadoc comments say to use the bean(...) methods as replacements for the beanRef(...) methods. Source reference: https://github.com/apache/camel/blob

Use existing http server in spring boot as camel endpoint

女生的网名这么多〃 提交于 2019-12-05 07:00:30
问题 I have a spring boot application that uses the spring boot starter web. This creates a running Tomcat instance and sets up the http server running on a port. Within my camel route, I want to use this http server as the component for http requests, but I can't figure out how to utilize it. I see many many examples of configuring a jetty instance and consuming from it, but then wouldn't I in effect have two http servers running? I only want to have one. I assume the http server is already

Unable to deploy a osgi bundle containing a camel route defined via aries blueprint in Websphere 8.5

吃可爱长大的小学妹 提交于 2019-12-05 06:14:03
问题 I created an .eba file (enterprise bundle archive) that contains one osgi bundle having a apache camel route (Java DSL). The camel context definition is done via a blueprint xml file. When I tried to deploy the .eba file in Websphere Application Server 8.5, I got the following exception: org.apache.aries.application.modelling.ModellerException: CWSAL0126E: An exception occurred while modelling bundle ib-base_0.0.1.SNAPSHOT: org.apache.aries.application.modelling.ModellerException: org.osgi

Using Apache Camel CMIS with Sharepoint 2013

耗尽温柔 提交于 2019-12-05 05:52:24
I can successfully access Sharepoint 2013 AtomPub interface from Chrome REST clients, the following URL gives me the file I want: http://ourintranet:100/personal/myname/_vti_bin/cmis/rest/5612e38e-a324-4030-9fee-7d05cd9053a4?getContentStream&objectId=4-512 However, using the same URL in the Camel CMIS route gets me HTTP 302 (File not found) and diverts me to an error page. The route I tried is: from("cmis:http://ourintranet:100/personal/myname/_vti_bin/cmis/rest/5612e38e-a324-4030-9fee-7d05cd9053a4?getContentStream&objectId=4-512") .to("file:c:/myFolder") Running Wireshark to see what is going

Camel: “file” component, but only pass file name as body

杀马特。学长 韩版系。学妹 提交于 2019-12-05 05:43:27
I'm trying to process potentially large files using Camel, and am worried about them "fitting" in the body of a Camel Message . Is there a way I can just pass the name (path) of the file as the body of the message, and then in a processor use that to read from disk? You can just pass in a java.io.File instance. This is essentially what the Camel file component does itself (although its placed inside a WrappedFile, due sharing code with the ftp components). You can of course also just store the name of the file as a String, and then from the processor access the file, either by String name =

Business logic in Camel processors vs service endpoints

半世苍凉 提交于 2019-12-05 05:29:37
In a Camel route, should I be thinking about putting my business logic in a discretely hosted bean endpoint, like a message-driven bean or a web service, vs just implementing it in Camel processors? It seems like cleaner separation of concerns to use Camel just for mediation & orchestration, using Processors as filters, rather than as a container for business logic. However I don't forsee the need for an EJB container at this time, and it seems like I'd need one to host MDBs. So cleaner architecture vs smaller footprint, fewer technologies - Does anyone have thoughts, perspectives, or strong

Camel CXF POJO mode using Java DSL

二次信任 提交于 2019-12-05 05:27:23
I have a pre-existing web service "connect" (SOAP) I would like to call without using the Swing framework if possible. I have followed the contact first development generating my java files using cxf/wsdl2java tool. I wish for the userName and password to be extracted from the java object and placed in a SOAP object then sent onot my localhost web service. When sending the Connect object as a body to the "direct:start" I get an exception... Caused by: java.lang.IllegalArgumentException: Get the wrong parameter size to invoke the out service, Expect size 2, Parameter size 1. Please check if the

How to send file as mail attachment via camel spring DSL

点点圈 提交于 2019-12-05 02:31:45
问题 I'm using Camel 2.9.x for integration purposes in our current project. One of the routes consists of two endpoints - file polling endpoint and smtp mail endpoint. Files produced by the first endpoint must be sent through smtp endpoint as attachments. For Camel configuration we're using Spring DSL (this actually is a requirement). Spring version is 3.1.1. Unfortunately, I've found only java dsl examples and documentation of attaching a file to a e-mail message in camel routes. <endpoint uri=

java.lang.IllegalArgumentException: Some fields are missing (optional or mandatory)

和自甴很熟 提交于 2019-12-05 02:28:58
I am trying to create a fixedfile reader using Apache Camel Bindy but am getting exception.Please help me to find the solution.Without header and footer which is working well. Update: File is small to understand now and public is added File Content: 101-08-2009 30A9 20A9 60A9 40A9 10A9 50A8 9000000002 New Exception: java.lang.IllegalArgumentException: Some fields are missing (optional or mandatory), line: 2 at org.apache.camel.dataformat.bindy.BindyFixedLengthFactory.bind(BindyFixedLengthFactory.java:295) ~[camel-bindy-2.19.1.jar:2.19.1] at org.apache.camel.dataformat.bindy.fixed