apache-camel

Logging simple text in Apache Camel logs

微笑、不失礼 提交于 2019-12-23 10:59:13
问题 Is is possible to log simple text in Camel as follows <route> <from uri="direct:cxlrefdata"/> <to uri="log:'Hello World'" /> </route> I want to log this message, 'Hello World' in log, but all the examples which I find in Apache Camel site are for logging route messages. e.g <route> <from uri="direct:t1"/> <to uri="log:output?showAll=true" /> </route> I want something simple which can log test messages. 回答1: Yes see the log eip http://camel.apache.org/logeip.html This allows you to log human

Logging simple text in Apache Camel logs

試著忘記壹切 提交于 2019-12-23 10:59:07
问题 Is is possible to log simple text in Camel as follows <route> <from uri="direct:cxlrefdata"/> <to uri="log:'Hello World'" /> </route> I want to log this message, 'Hello World' in log, but all the examples which I find in Apache Camel site are for logging route messages. e.g <route> <from uri="direct:t1"/> <to uri="log:output?showAll=true" /> </route> I want something simple which can log test messages. 回答1: Yes see the log eip http://camel.apache.org/logeip.html This allows you to log human

Apache camel Connection pool timeout with restlet even after configuring component options

霸气de小男生 提交于 2019-12-23 10:56:11
问题 I have a camel Java DSL route which invokes a restlet endpoint. And the route works without any issues when I hit the same manually. But, when I try to pump a larger number of requests through code I'm getting " Timeout waiting for connection from pool " And the following is stackt-race of the same: 2016-01-29 14:09:38.650 WARN 20256 --- [pool-3-thread-2] org.restlet : An error occurred during the communication with the remote HTTP server.org.apache.http.conn.ConnectionPoolTimeoutException:

Apache Camel: can message have multiple objects in body (with different classes)?

一个人想着一个人 提交于 2019-12-23 09:59:11
问题 I have almost ready application in java that use jms with Camel. Pop up that we I have to add additional infomations in exchange/message. Lets say that those additional infomations are in fact new java object. What is the best way to add my new object to exchange? I have a lot of Camel processors processing the message that look like this: public class MyProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { String s = exchange.getIn().getBody

Apache Camel JMS - Exceptions not returned to caller with request/reply

为君一笑 提交于 2019-12-23 09:43:05
问题 I created a simple request/reply setup with Apache Camel and JMS. Everything works fine - calls are dispatched to the server side service and results are returned to the client. Only when there is an exception on the server side this exception will not be returned to the caller. The exception appears on the server and the client receives a timeout. I would like to receive the exception on the client side. As far as I understood the available docs that what I want should be the default

Camel: How to include an ampersand as data in a URI (NOT as a delimiter)?

丶灬走出姿态 提交于 2019-12-23 09:19:45
问题 (Camel 2.9.2) Very simple use case, but I can't seem to find the answer. My code boils down to this: String user = "user"; String password = "foo&bar"; String uri = "smtp://hostname:25?username=" + user + "&password=" + password + "&to=somthing@something.com"; // etc. You get the idea from("seda:queue:myqueue").to(uri); Camel throws a ResolveEndpointFailedException with "Unknown parameters=[{bar=null}]." If I try "foo%26bar," I get the same result. If I try "foo&bar" camel responds with

Warning when deploying Apache Camel application

▼魔方 西西 提交于 2019-12-23 08:02:10
问题 I'm seeing the following warning when I deploy my application to GlassFish: WARN AnnotationTypeConverterLoader - Ignoring converter type: org.apache.activemq.camel.converter.ActiveMQMessageConverter as a dependent class could not be found: java.lang.NoClassDefFoundError: org/apache/camel/Processor java.lang.NoClassDefFoundError: org/apache/camel/Processor The application seems to work as expected but this warning is annoying me. I have the following in my POM: <properties> <camel-version>2.13

Warning when deploying Apache Camel application

大兔子大兔子 提交于 2019-12-23 08:01:17
问题 I'm seeing the following warning when I deploy my application to GlassFish: WARN AnnotationTypeConverterLoader - Ignoring converter type: org.apache.activemq.camel.converter.ActiveMQMessageConverter as a dependent class could not be found: java.lang.NoClassDefFoundError: org/apache/camel/Processor java.lang.NoClassDefFoundError: org/apache/camel/Processor The application seems to work as expected but this warning is annoying me. I have the following in my POM: <properties> <camel-version>2.13

How to delay a JMS message in queue before a listener receives it using camel?

北城余情 提交于 2019-12-23 05:29:31
问题 I am trying to delay a message to be in queue for few seconds. But when I use camel delay option, it is not delaying in queue, instead it is immediately consumed, and delaying in the route path. How can we delay messages so that they will be there in queue for few seconds? My spring with camel configuration looks like below. <bean id="jms" class="org.apache.camel.component.jms.JmsComponent"> <property name="connectionFactory" ref="jmsConnectionFactory" /> </bean> <camelContext id=

How to export a JTable to a .csv file?

自作多情 提交于 2019-12-23 05:04:39
问题 Like the title implies, i am looking for a way to export a jtable with data to a .csv file . I am not looking for other options then CSV , because CSV is the requirement for my program. I have been looking at certain things, like bindy of apache.camel put I couldn't find enough information to understand how to use it. What is recommended? If someone has a decent example of the usage of bindy I wouldn't mind either. Friendly regards, Skillcoil 回答1: You can use apache poi to generate an Excel