apache-camel

How to add an EventNotifier to Camel using Main class standalone

痞子三分冷 提交于 2019-12-13 00:26:08
问题 I'm trying to add an EventNotifier to my Apache Camel standalone application which uses the Main class from Camel. http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html public void boot() throws Exception { Main main = new Main(); main.addRouteBuilder(new MyRouteBuilder()); System.out.println("Starting Camel. Use ctrl + c to terminate the JVM.\n"); main.run(); } I want to add an EventNotifier like in this cookbook example: http://camel.apache.org/eventnotifier-to-log

Move files on ftp

笑着哭i 提交于 2019-12-13 00:22:47
问题 I am working with Apache Camel Spring Framework. I have a component FTP (to get files from ftp) and Bean (process files and store it in database). All I have missing is when I process those files and store it in database I have to check if insert or update was successful (this is working too). If the action is successful I have to move the file to another folder on ftp, if it is unsuccessful I have to move it to a different folder on ftp. So I am asking if there is a simple way to copy the

camel stop when there are no files in the folder

五迷三道 提交于 2019-12-13 00:16:34
问题 I'm new to camel. I'm trying to create a small application that allows me to move a file from one location to another. I am forced to use camel for various reasons. I can execute the move but I can not make camel stop when there are no more files within the folder. I tried in several ways but without success. Here is the code I used: try { Main main = new Main(); main.addRouteBuilder(createRouteBuilder()); main.run(); } catch (Exception e1) { e1.printStackTrace(); } protected RouteBuilder

Pros and Cons of setting Lot of headers in Camel Exchange

♀尐吖头ヾ 提交于 2019-12-13 00:15:03
问题 I would like to know few things about Camel Headers what are the pros and cons of setting too many headers in camel Exchange? what are the pros and cons of setting too large headers in camel Exchange? 回答1: If you have too many or too large , then by definition there will be problems. But let's consider simply many and large instead. Many Headers The headers in Camel are held in a java.util.TreeMap , so there may be some performance characteristics to consider with this data structure. Perhaps

How to handle camel-quickfix CannotSendException?

别等时光非礼了梦想. 提交于 2019-12-12 23:59:29
问题 I am using QuickFix/J 1.6.4 in a camel-quickfix component. Sometimes, I get the CannotSendException and it is not clear, what the exception cause is. I looked at the code, but there it seems that this exception is thrown, when the message could not be send - regardless of the reason. So how do I have to handle this exception? Do I have to implement a retry mechanism, or does the engine handle this for me? If the engine does, how can I verify, that the message is sent afterwards? Exception

Jetty - How to make a camel application log events to the hawtio Logs tab

蹲街弑〆低调 提交于 2019-12-12 22:05:31
问题 I have a simple camel application logging events on a timer. The logs currently go to a ConsoleAppender. <route> <from uri="timer://hello?period=5000"/> <to uri="log:loggingstuff?showAll=true"/> </route> I have attempted to follow the documentation as per: http://hawt.io/plugins/logs/ The application is deployed as a war on jetty, and has log4j, slf4j and insight-log4j as dependencies. hawtio-default-1.4.37.war is deployed alongside it in the ${jetty.home}/webapps directory. Jetty is started

What causes the “Disconnecting: Encountered END_OF_STREAM” session message in QuickFix/J?

女生的网名这么多〃 提交于 2019-12-12 21:08:11
问题 I am using QuickFix/J version 1.6.4 within Apache Camel 2.17.0 and I get the session message Disconnecting: Encountered END_OF_STREAM . It is not an error, but in my case it leads to an unintentional Logoff . What circumstances can lead to this message and how do I analyze which circumstance in my case is the cause? 回答1: I found the answer of this question in this blog post by bhageera . In the end the reason was pretty silly… the counterparty I was connecting to allows only 1 connection per

Camel The application attempted to use a JMS session after it had closed the session

拜拜、爱过 提交于 2019-12-12 17:08:57
问题 I am new to camel and I am attempting to write an app that bridges Websphere MQ and Active MQ on JBoss EAP 7. The app deploys successfully works, I can drop messages on the Websphere queue, and it gets picked up by Active MQ. However I see error messages in the log showing it is attempting to use a connection after it is open. 15:48:57,814 ERROR [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener] (Camel (camel) thread #1 - JmsConsumer[I0_TEST]) IJ000315: Pool

Sql Connection in Spring Servicemix camel

雨燕双飞 提交于 2019-12-12 16:24:20
问题 Sql Connection in Spring Servicemix camel <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> <property name="url" value="jdbc:sqlserver://localhost:1433/orderdb"/> <property name="username" value="abc"/> <property name="password" value="pqr"/> </bean> When I try to make connection using dataSource.getConnection() Not allowing please help *****Connection Code *****

Creating JMS Queues at runtime [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 16:14:15
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . I am working on an application where the app user can create / delete queues . Also , he would be able to move a message from 1 queue to another, delete a message , rearrange the messages in the queue based on some filter. One possible design is to use activemq for queues and