apache-camel

Camel DataFormat Jackson using blueprint XML DSL throws context exception

陌路散爱 提交于 2019-12-22 01:35:05
问题 No matter where I place the dataformats in XML DSL blueprint, I get this error just starting at different places. if I remove it, it works but of course I can't convert JSON to POJO. ??? any help or tell me what I'm doing wrong, what i'm missing. thanks! Error Unable to start blueprint container for bundle passthrumt1.core/1.0.1.SNAPSHOT Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'endpoint'. One of '{"http://camel.apache

Camel Splitter Parallel Processing Array List - Concurrency Access Issue

守給你的承諾、 提交于 2019-12-22 01:19:40
问题 Using Camel to split an ArrayList and process each item in parallel up to 10 threads. Following is the config. Thread pool profile is set to max thread count =10. <camel:route id="ReportsRoute"> <camel:from uri="direct:processReportsChannel" /> <camel:to uri="bean:reportRepository?method=getPendingTransactions" /> <camel:split parallelProcessing="true" executorServiceRef="ReportThreadPoolProfile"> <camel:simple>${body}</camel:simple> <camel:doTry> <camel:to uri="direct:processReportChannel" /

Apache Camel Xpath 2.0 with Saxon does not look to work in RouteBuilder / Predicates

南楼画角 提交于 2019-12-21 22:23:22
问题 I am using ServiceMix 4.5.3 which includes Camel 2.10.7 and I am able to make XSLT 2.0 transformations with the Saxon library using the option endpoint like this: ... to("xslt:stylesheet.xsl?transformerFactoryClass=net.sf.saxon.TransformerFactoryImpl") ... However when I try to use the xpath function like this: private Namespaces ourNS = new Namespaces("myns", "urn:com:company:domain:namespace:myns/1"); // ... some code ... // Make a predicate to filter according a header : // The code

Camel-SQL Why using StreamList seems to load all ResultSet?

无人久伴 提交于 2019-12-21 20:44:16
问题 Hi, What am I trying to do ? I am currently working on an ESB project (apache-camel + spring boot 2) where i read a MySQL table with more than 100 000 000 rows. I empty this table 1 row at a time, transform the row and send it to another database. How am I doing this ? Currently I use camel-sql to read the data //edited .from(sql:SELECT * FROM mytable?outputType=StreamList&outpuClass=MyClass) .split(body()).streaming() .bean(mybean, "transform") .end() Problem : As I can't make a select * and

Apache Camel timer: “period” vs “fixedRate”

感情迁移 提交于 2019-12-21 17:41:14
问题 What is the exact use of "period" and "fixedRate" together ? does it really make sense because if i specified the "period" value then anyways timer will trigger after that interval. So what is the exact use of "fixedRate" flag ? I am confused please help me out ! 回答1: You can read the javadoc api of the java.util.Timer at: http://docs.oracle.com/javase/7/docs/api/java/util/Timer.html They explain the difference between fixed rate and delayed. 来源: https://stackoverflow.com/questions/17786173

Documenting Camel Routes

為{幸葍}努か 提交于 2019-12-21 14:11:51
问题 I have several Camel contexts in my project and i would like to document the routes if possible in a reverse engineering fashion since we want to keep the documentation up to date related to the context. what would be the best approach? 回答1: We tend to actually design the routes up front and model them using the iconography from the EIP book. That gives us a guide to then test drive our routes. Are your routes changing really often that reverse engineering is required? We are slowly looking

Implement Request-Reply pattern using ActiveMQ, Camel and Spring

我怕爱的太早我们不能终老 提交于 2019-12-21 12:39:56
问题 I am trying to implement the following functionality: Read CSV file line-by-line then for every line: Build request based on the values that the line contains Send the request to the message queue Other component needs to pick up the message, process the request and send the response to another message queue (known to producer, so the producer could pick up the response). I believe that the request-reply pattern fits the bill. I installed ActiveMQ, downloaded camel and tried to use their jms

Apache Camel - transaction in routes

六眼飞鱼酱① 提交于 2019-12-21 10:51:22
问题 I have a general question about Apache Camel. I wasn't able to find whether the aggregator is transacted. If it is transacted, how the transactions are implemented and how fast the aggregation is? 回答1: Sending the messages into the aggregator can run in a transaction. You would need a persistent store with the aggregator to let the outgoing messages act as a transaction. See the documentation about persistence http://camel.apache.org/aggregator2 For example there is a JDBC based and HawtDB

Camel in OSGi Container: Apply InterceptStrategy to all camel contexts

醉酒当歌 提交于 2019-12-21 06:53:03
问题 I have several bundles (A, B, and C) deployed to an OSGi container, each containing a CamelContext and some routes. I have another bundle (M) with a CamelContext with a route (for collecting monitoring data) and a InterceptStrategy bean. I would like the InterceptStrategy bean from M to automatically apply to all of the other CamelContext s in the container (i.e., those in A, B, and C), without having to modify the other bundles. Ultimately, the goal is to wiretap data from each CamelContext

Processing multiple message in parallel with ActiveMQ

梦想与她 提交于 2019-12-21 05:34:10
问题 I'd like to process messages in a queue in parallel using a simple Processor/AsyncProcessor as a destination. The processor takes a little time per message, but each message can be handled seperately, and thus at the same time (within healthy boundaries). I'm having a hard time finding examples, especially about the xml configuration of camel routes. So far, I've defined a threadpool, route and processor: <threadPool id="smallPool" threadName="MyProcessorThread" poolSize="5" maxPoolSize="50"