Important difference in behaviour between processRef and beanRef
Hello, I have found an important difference in behaviour between processRef and beanRef, which maybe someone can explain to me, please. For example, take the following route, which consumes from a queue, enriches the message and then finally sends the message to another queue (where EnricherProcessor is a Processor, implementing the 'process' method) from(REQUEST_QUEUE_ENDPOINT) .processRef(EnricherProcessor.ENRICHERPROCESSOR_ID) .to(RESPONSE_QUEUE_ENDPOINT); When using a Processor, the original message, not the enriched one, reaches the response queue, which is not what is expected. Compare this to the beanRef version: from(REQUEST_QUEUE_ENDPOINT) .beanRef(EnricherProcessor.ENRICHERPROCESSOR_ID, process) .to(RESPONSE_QUEUE_ENDPOINT); Using beanRef, the enriched messaged reaches the response queue. Why the difference in this behaviour, please? In the Processor we only ever manipulate using exchange.getIn() since then the 'In' is copied to the 'Out' if getOut() has not been called (as per the documentation) Could someone explain this difference please? Cheerio, Nic -- View this message in context: http://camel.465427.n5.nabble.com/Important-difference-in-behaviour-between-processRef-and-beanRef-tp5715525.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Important difference in behaviour between processRef and beanRef
So I have had a look at the exchange pattern and appears that the following route defaults to InOnly: from(REQUEST_QUEUE_ENDPOINT) .processRef(EnricherProcessor.ENRICHERPROCESSOR_ID) .to(RESPONSE_QUEUE_ENDPOINT); So if I do the following: from(REQUEST_QUEUE_ENDPOINT) .setExchangePattern(ExchangePattern.InOut) .processRef(EnricherProcessor.ENRICHERPROCESSOR_ID) .to(RESPONSE_QUEUE_ENDPOINT); Then it all works as expected. It is certainly not intuitive that a route with from(q1) and to(q2) be InOnly... I thought that InOut should used when you want to send a request and consume the response? As per http://camel.apache.org/request-reply.html Cheerio, Nic -- View this message in context: http://camel.465427.n5.nabble.com/Important-difference-in-behaviour-between-processRef-and-beanRef-tp5715525p5715532.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel 2.9.0 startup error message ClassNotFoundException org.osgi.framework.BundleActivator
Hello, Please could someone tell me how to solve this error message that occurs in my JBoss server logs: Failed to define class org.apache.camel.osgi.Activator in Module from Service Module Loader: java.lang.LinkageError: Failed to link org/apache/camel/osgi/Activator Caused by: java.lang.ClassNotFoundException: org.osgi.framework.BundleActivator at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) The Activator class itself appears to be in package org.apache.camel.impl.osgi not package org.apache.camel.osgi - is this a problem with the default setting? I am not (explicitly) using the Activator (I don't really know what it is to be honest) but i would prefer not to get an error message in my logs every time the server starts Many thanks Cheerio, Nic -- View this message in context: http://camel.465427.n5.nabble.com/Camel-2-9-0-startup-error-message-ClassNotFoundException-org-osgi-framework-BundleActivator-tp5133932p5133932.html Sent from the Camel - Users mailing list archive at Nabble.com.
FTP consumer ignore existing files: configuration option?
Hello, I am using Camel successfully in my project, but have a question concerning the FTP consumer, specifically, with regard to existing files in a watched remote folder. Is there any way of ignoring all files that 'pre-exist' on the server, hopefully, through configuration on the route i.e. ignoreExisting=true or similar? I am only interested in *new* files that get added to the remote folder, not files that already exist when the route is created via the camel context. Many thanks for any pointers (maybe I have missed an obvious config param) Cheerio, Nic -- View this message in context: http://camel.465427.n5.nabble.com/FTP-consumer-ignore-existing-files-configuration-option-tp5131747p5131747.html Sent from the Camel - Users mailing list archive at Nabble.com.