apache-camel

Camel NotifyBuilder always returns false

别来无恙 提交于 2019-12-23 04:57:10
问题 I've got a fairly simple route: PerfStubRouteBuilder.java public class PerfStubRouteBuilder extends SpringRouteBuilder { /* (non-Javadoc) * @see org.apache.camel.builder.RouteBuilder#configure() */ @Override public void configure() throws Exception { from("direct:test-aces-input") .log("Creating test Accident Number header") .setHeader("AccidentNumber", simple("AB999999999")) .log("Test Accident Number header created : ${header.AccidentNumber}") .end(); } } and I'm testing it as follows:

camel jdbc out of memory exception

无人久伴 提交于 2019-12-23 04:45:52
问题 I am trying to ingest data from postgres to another DB and I am using camel-jdbc component to do it. I have a large table so I want to read few rows at a time instead of the whole table altogether. so my route looks like below (only for testing purpose) from(fromUri).setBody("select * from table limit 10").to("jdbc://myDataSource?resetAutoCommit=false&statement.fetchSize=2").split(body()).streaming().process(test) As shown above, I am only getting 10 rows at a time for testing purpose and I

Making Camel routes run in parallel

让人想犯罪 __ 提交于 2019-12-23 02:41:16
问题 I have an application which does some basic ETL using camel routes. Each route is configured to take some data from one table do some transformation and safe it into the same table on a different schema. So there is an one to one relationship between a camel route and a table. Say I have these two routes: from("direct:table_1").routeId(table1Route) .setBody("SELECT * FROM table_1) .to("jdbc:source_schema").split(body()).streaming() .process("someProcessor") .to("sql:INSERT INTO table_1 ...

Spring Integration: TCP Client/Server opening one client connection per server connection

安稳与你 提交于 2019-12-23 02:25:29
问题 I'm trying to implement a TCP client/server application with Spring Integration where I need to open one TCP client socket per incoming TCP server connection. Basically, I have a bunch of IoT devices that communicate with a backend server over raw TCP sockets. I need to implement extra features into the system. But the software on both the devices and the server are closed source so I can't do anything about that. So my thought was to place middleware between the devices and the server that

difference between embedded and standalone activemq broker

我是研究僧i 提交于 2019-12-23 02:19:18
问题 I am using Spring for my application. I am wondering what differences there is between "embedded" ActiveMQ and "stand-alone" ActiveMQ. If I run ActiveMQ embedded, does thing mean remote clients can still connect up? Is my understand correct that embeded ActiveMQ means that ActiveMQ will start automatically when I start my Spring application, or is there some other meanings to it? For example Let's say I have deployed one application in system-A and deployed the same application in system-B.in

Implementing a Custom Process Strategy with Apache Camel File Component

陌路散爱 提交于 2019-12-23 01:54:44
问题 Problem Background I am currently working on a camel based ETL application that processes groups of files as they appear in a dated directory. The files need to be processed together as a group determined by the beginning of the file name. The files can only be processed once the done file (".flag") has been written to the directory. I know the camel file component has a done file option, but that only allows you to retrieve files with the same name as the done file. The application needs to

How to set receiveTimeout and connection timeout for cxfEndpoint

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 01:36:10
问题 I am trying to set receiveTimeout and connection timeout for cxfEndpoint in below code .. I got so many spring dsl related answer but i am using camel dsl specifically. I am trying to set receiveTimeout and connection timeout for cxfEndpoint in below code .. I got so many spring dsl related answer but i am using camel dsl specifically. I am trying to set receiveTimeout and connection timeout for cxfEndpoint in below code .. I got so many spring dsl related answer but i am using camel dsl

akka-camel 2.2.1 route definition using Spring XML

白昼怎懂夜的黑 提交于 2019-12-22 19:48:41
问题 I am using akka-camel 2.2.1 and need to configure routes to and away from Consumer and Producer actors, respectively. I am currently defining routes and adding them to the internal Camel context within the CamelExtension programmatically like so: camel.context.addRoutes(new RouteBuilder { def configure() = { from("file:/tmp?include=whatever.*.log&noop=true&sendEmptyMessageWhenIdle=true") .split(body(classOf[String]).tokenize("\n")) .streaming() .to("seda:input-route") from("seda:update-route"

how to handle exception or fault in multiple routes

十年热恋 提交于 2019-12-22 18:16:50
问题 I have some problems when handle the exception between multiple routes. As a java developer's perspective, I want to extract some common logic to a common route so that other routes can call the common route directly without containing the common logic everywhere.(like the route-version function call) But when it comes to the error handling, I found it's a little tricky. For instance: //main logic 1 from("direct:route1") .doTry() .to("direct:common") .doCatch(Exception.class) .log("Error in

Apache Camel Loop does not stop on exception

我的未来我决定 提交于 2019-12-22 11:19:38
问题 I have camel loop configured within the main route of camelContext.xml file that would invoke request processing route 3 times. I have also configured onException xml handler (set handled to true). However, when there is an exception on the first iteration the execution control goes to onException block but loop doesn't stop processing instead the other 2 iterations (2nd and 3rd) do happen too. I would like to have loop stopped as soon as exception occurs. Can anyone please help Thanks in