apache-camel

Trouble filtering in Camel

孤者浪人 提交于 2019-12-08 03:40:13
问题 I am attempting to filter out the null bodies from my route. The route polls from the function every half second or so. So, I get this error in my console also every half-second. Here is the stack trace: Message History --------------------------------------------------------------------------------------------------------------------------------------- RouteId ProcessorId Processor Elapsed (ms) [route1 ] [route1 ] [browserBean ] [ 0] [route1 ] [filter1 ] [filter[simple{(${body} == null)}] ]

stored procedure invokation through camel sql-stored component

让人想犯罪 __ 提交于 2019-12-08 03:37:32
I am new to camel sql-stored component. Currently I am using Camel 2.17.5. And I am trying to invoke oracle stored procedure from camel route. This is my route: <setHeader headerName="test"> <simple>John</simple> </setHeader> <log loggingLevel="INFO" message="value: ${headers.test}" /> <to uri="sql-stored:HELLO(VARCHAR ${headers.test},OUT VARCHAR outparam1)?dataSource=oracleDataSource"/> <log loggingLevel="INFO" message="SP result: ${body}" /> This is my stored procedure: CREATE OR REPLACE PROCEDURE hello(param1 IN varchar2, outparam1 OUT varchar2) AS BEGIN select password INTO outparam1 from

Camel Sql Consumer Performance for Large DataSets

青春壹個敷衍的年華 提交于 2019-12-08 03:31:15
问题 I am trying to cache some static data in Ignite cache in order to query faster so I need to read the data from DataBase in order to insert them into cache cluster. But number of rows is like 3 million and it causes OutOfMemory error normally because SqlComponent is trying to process all the data as one and it tries to collect them once and for all. Is there any way to split them when reading result set (for ex 1000 items per Exchange)? 回答1: You can add a limit in the SQL query depending on

Apache Camel - Dynamically changing throttle values

我们两清 提交于 2019-12-08 02:54:06
问题 Can anyone please give a sample on how to dynamically change the maxRequestsPerPeriod by using a Throttler processor instance or using a throttle element in Apache Camel ? (Reference - How to change Processor properties during runtime using Camel?) We cannot use Expression with header because if the header is absent then the Throttler uses the old value. What we need is, in a bean based on some condition we have to update the throttle value so that it will be used until next update. In our

Configure Log4j in Camel context

匆匆过客 提交于 2019-12-08 01:59:47
问题 Is it possible to configure a Camel route to send a message to a specific log4j logger? For example, I have the following logger: <logger name="com.me.log.mylogger" additivity="false"> <level value="debug" /> <appender-ref ref="file_appender_messages" /> </logger> file_appender_messages is just a RollingFileAppender . I then try to log it using the following in my Camel context: <to uri="log:com.me.log.mylogger?level=INFO" /> But it outputs on the command line instead of the log file

Newbie : ActiveMQ with Camel

 ̄綄美尐妖づ 提交于 2019-12-08 01:44:24
问题 I'm pretty new to this topic and need some explanation... We have a running ActiveMQ-Server, which should now be enhanced with Apache Camel routing and processing. Our whole configuration is XML based. My first approach was to do a plain <import resource="camel.xml"> at the end of our activemq.xml, but this seems to be the wrong path. These are the current transortConnectors: <transportConnectors> <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->

Camel + Jackson : Register a module for all deserialization

倾然丶 夕夏残阳落幕 提交于 2019-12-07 21:52:18
问题 I'm using Camel for my application, and messages come in to routes as JSON. I use JACKSON as my deserializer. I have a case where I require a custom serializer/deserializer to handle one of my messages. What I want to do is register the custom serializer/deserializer for keys. In Camel, how do I make sure that the serializer/deserializer is available for whenever I marshall/unmarshall in my routes? 回答1: You can define what dataformat you want using .unmarshal(<dataFormatComponent>) http:/

Reading reloadable xml file from external Tomcat directory

对着背影说爱祢 提交于 2019-12-07 19:04:47
问题 Prerequisites Apache Tomcat 7 Spring 3.2.11.RELEASE Apache Camel 2.14.1 My Webapplication is deployed in ${catalina.home}/webapps/ as usual Requirements Reading xml file placed outside of war-Archive (for example from ${catalina.home}/myfolder/) The xml file should be reloadable . So if the xml changes the new xml file should be available in my Webapplication The xml file should be mapped to Java-Objects First try I have added the file to classpath via tomcat in catalina.home /conf/catalina

Camel-Jetty http proxy + large response data casue issue: Buffering capacity exceeded

ε祈祈猫儿з 提交于 2019-12-07 15:44:33
问题 jetty expert, I got error when getting back large data via camel-jetty as http proxy, any experience/idea/suggestion are welcome, thanks in advance. RouteBuilder code: from("servlet:balancer?matchOnUriPrefix=true") .to("jetty:http://vm-a38e-8f19.nam.nsroot.net:19999/balancer/?" + "bridgeEndpoint=true" + "&disableStreamCache=true" + "&throwExceptionOnFailure=false" + "&bufferSize=1024000000" + "&inboundBufferSize=1024000000" + "&outboundBufferSize=1024000000" + "&eagerCheckContentAvailable

I want to conditionally split a List if exxchange is a List and continue processing

谁都会走 提交于 2019-12-07 15:18:33
I'm trying to conditionally split an exchange into its contents if it is a List, otherwise leave it as a single item and have both go to the same processor I ideally do not want to set up lots of inbetween direct:endpoints to achieve this from( X ) .when( body().isInstanceOf( List.class ) .split( body() ) .setHeader( "x", constant( "I don't care " ) // this needs to be set as split must have at least one child node .process( ? ) // here the exchange.in.body is now a single item from the List // this is what I want to continue outside of this when block .end() // also tried .end().end() and