error handling async instead of sync

2013-07-23 Thread Marco Westermann
Hi, I have a route with an errorHandler configured. I set it to redeliver async. But when an error occures the remaining messages on the queue are processed after the redelivery of the failed message ends. Here is my routebuilder: http://pastebin.com/8fUED75R Is there something wrong with it

Re: FTP endpoint failure

2013-07-23 Thread Bart Horré
Hi, what exactly do you want to handle when the ftp is down? There won't be an exchange to handle / errorhandle yet since the files on the ftp can't be accessed On Tue, Jul 23, 2013 at 6:09 AM, Richa wrote: > Hi, > I have a small camel route where my input endpoint is FTP. I want to handle > t

Re: Probleme with startorder

2013-07-23 Thread Bovas
thanks for your answer bibryam. I find a solution, but i think it's not the best solution. In my bean, I created a boolean and when the first route finish, I start the second. I did a while loop in my second route before his treatment => *while(!isRead);* isRead become true when my first route

Re: Canonical Way to Create a New Message Given Certain Conditions

2013-07-23 Thread al94781
Hi @claus, @ceposta Thanks for this. I'm keenest to ensure we don't go against the grain of the "Camel-way". I've pushed against frameworks before and it always ends badly. :D To that end, both options you propose make a lot of sense. @caposta, your option sounds like it keeps the handling an

Re: Custom names for processors within routes

2013-07-23 Thread Andreas Gies
Works like a charm; as expected ;) Thx Andreas Am 7/22/13(30) 5:22 PM schrieb "Claus Ibsen" unter : >Hi > >Yep set the id of the processors. Then that id is used as part of the JMX >name >http://camel.apache.org/camel-jmx.html > >.process( ... ).id("nameOfMyProcessor") > >On Mon, Jul 22, 2013

Re: Camel Thread does not terminate

2013-07-23 Thread Andreas Gies
Hi, It might be my complete ignorance of the problem, but have you considered to leave your context happily running and take advantage of the many mechanisms in Camel to leverage Thread pools and the like ? Just my 2 ct Andreas Am 7/23/13(30) 7:26 AM schrieb "SyedBhai" unter : >No. That doe

Re: FTP endpoint failure

2013-07-23 Thread Richa
I want to set the maximum number of retries and after the retries I want to shut down my route. I cannot do it now because the control never goes to the onException block as the FTP never throws exception when it is an input endpoint. -- View this message in context: http://camel.465427.n5.nabb

Re: error handling async instead of sync

2013-07-23 Thread Raul Kripalani
You can add the concurrentConsumers option to the JMS consumer. Camel will then keep consuming messages in other threads even if the first one is busy doing the redeliveries. Alternatively, you can configure broker-side redeliveries in AMQ is you want async behavior. In that case, you should not h

Re: FTP endpoint failure

2013-07-23 Thread Claus Ibsen
Hi See this link http://camel.apache.org/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.html On Tue, Jul 23, 2013 at 9:56 AM, Richa wrote: > I want to set the maximum number of retries and after the retries I want to > shut down my r

Re: error handling async instead of sync

2013-07-23 Thread Claus Ibsen
Hi You have to set asyncConsumer=true on the JMS endpoint. See details at http://camel.apache.org/jms On Tue, Jul 23, 2013 at 9:12 AM, Marco Westermann wrote: > Hi, > > I have a route with an errorHandler configured. I set it to redeliver async. > But when an error occures the remaining message

Re: Is it possible to import Endpoints from a xml file like routeContextRef?

2013-07-23 Thread Claus Ibsen
Do you mean having a bunch of in the If so I dont think its supported yet. There is a JIRA ticket to improve to allow defining stuff besides just s On Tue, Jul 23, 2013 at 12:16 AM, bonnahu wrote: > Hey guys, > We can import routes from other XML files by using routeContextRef. Does > anyo

Re: Camel Example Restlet JDBC Master

2013-07-23 Thread Babak Vahdat
Hi I assume you mean the following example: https://github.com/bibryam/camel-example-restlet-jdbc Which is an ASL 2.0 example about using Apache Camel contributed to the community by Bilgin Ibryam (A very talented Apache Camel Committer). I made a pull request to make the example work again: h

Re: Camel Example Restlet JDBC Master

2013-07-23 Thread Bilgin Ibryam
Babak, thanks for the nice introduction and pull request :) I applied it your changes and the example should be working fine again. Bilgin On 23 July 2013 09:19, Babak Vahdat wrote: > Hi > > I assume you mean the following example: > > https://github.com/bibryam/camel-example-restlet-jdbc > > W

Re: Camel Example Restlet JDBC Master

2013-07-23 Thread Claus Ibsen
Hi Maybe the example could be migrated to camel examples so we offer it out of the box in the kit? http://camel.apache.org/examples On Tue, Jul 23, 2013 at 10:58 AM, Bilgin Ibryam wrote: > Babak, > > thanks for the nice introduction and pull request :) > I applied it your changes and the example

Re: Probleme with startorder

2013-07-23 Thread Claus Ibsen
Hi You can also mark the 2nd route to not auto start. And then from 1st route you can start the 2nd route. For example just using the controlbus in the route http://camel.apache.org/controlbus.html .to("controlbus:route?routeId=idOfRoute2&action=start") Or do like this FAQ http://camel.apache.o

Re: Camel Example Restlet JDBC Master

2013-07-23 Thread Bilgin Ibryam
On 23 July 2013 10:01, Claus Ibsen wrote: > Hi > > Maybe the example could be migrated to camel examples so we offer it > out of the box in the kit? > http://camel.apache.org/examples This was my intend originally, but thought it is not an interesting example. Now I will move it Camel though B.

Re: After camelContext shutdown, is any way to exit the Java main() method?

2013-07-23 Thread Claus Ibsen
Hi Maybe there is a non-daemon thread still hanging around and preventing the JVM from terminating. You can do a thread dump to see which threads is alive. But the system exit also works but just a bit more abrupt than a clean shutdown. On Mon, Jul 22, 2013 at 5:47 PM, bonnahu wrote: > Hi Will

Re: Quartz and enrich seem not to work together...

2013-07-23 Thread Claus Ibsen
You can set idempotent=false on the file to allow it to re-read the file always. As when you use noop=true that would otherwise imply idempotent=true. But by setting it explicit to false will always make the file readable again. On Mon, Jul 22, 2013 at 8:39 PM, roger_rabbit wrote: > Hi, > > I re

Re: Which Component of camel is used for subscriptions or polling?

2013-07-23 Thread cannykanna
Hi Christopher, The Document link you sent was very helpful. Thank you so much :) Does the Camel has any component that supports polling other than EIPs? Do you have any example where polling is executed? Regards Kannaiah -- View this message in context: http://camel.465427.n5.nabble.com/Which

How to Pause Quartz Componenent

2013-07-23 Thread Dayakar
Hi, I am using Quartz Component which run Daily at 20:00 I configured it as from("quartz://myGroup/myTimerName?cron=0+0+20+1/1+*+?+*").routeid("MainRoute").to("jms:queue:outBoundQueue") I need to pause the Route for few Days Iam using camelContext.suspendRoute("MainRoute"); But still Quartz

Re: Camel in Openshift

2013-07-23 Thread James Strachan
I'm working with Ioannis on a Fuse OpenShift cartridge so that folks can easily run all of Fuse on OpenShift, visualise their camel routes, edit them on the fly with custom palettes from a web browser, provision them, do rolling upgrades & view real time metrics etc. i.e. the full iPaaS demo on Op

Re: Leveraging CXF Asynchronous processing when MEP is InOut

2013-07-23 Thread Edwin
Since my cxf call has an MEP of InOut, is it possible to achieve the cxf asynchronous behavior? Or is the cxf asynchronous behaviour only associated with an MEP of InOnly? Thanks, Edwin -- View this message in context: http://camel.465427.n5.nabble.com/Leveraging-CXF-Asynchronous-processing

Re: conditional uri

2013-07-23 Thread Bart Horré
I often usen a mechanism to conditionally route based on test or production environment where I load a spring property to identify the environment and create the endpoints based on the environment. In Java DSL you could make an abstract route builder to house the common logic and write to direct:

Re: After camelContext shutdown, is any way to exit the Java main() method?

2013-07-23 Thread SyedBhai
Hi. I am having a simple class with main(). In main() I am executing the following code: try { CamelContext cc=new DefaultCamelContext(); cc.addRoutes(new RouteBuilder() { public void configure() { from("direct:s

Re: jsf and apache camel

2013-07-23 Thread James Strachan
On 22 July 2013 11:26, lassesvestergaard wrote: > Thank you very much James. > > I ended up using JSF. I found out how to integrate Camel into a JSF > application. I'm not sure it's the best way, but it seems to work (please > enlighten me if you know a better solution). angularjs is a much bette

Re: Camel routing issue

2013-07-23 Thread prabumc...@gmail.com
Hi I need one help,I want set JMSExpiration value before routing messages. i tried setting JMSExpiration in .setHeader But it didn't work.I still seeing JMSExpiration is zero. *Thanks* Prabu.N On Wed, Apr 24, 2013 at 9:28 PM, Prabu wrote: > Please kindly help me. > > > Regards > Prabu.N > >

How to get User ID from ActiveMQ to Camel

2013-07-23 Thread Daniel Kleine-Albers
Hi everyone, I'm trying to get the ActiveMQ username of the sender of a particular message into Camel for further processing. However this does not seem to work. I have setup my ActiveMQ broker to populate the JMSXUserID message property. useShutdownHook="false" useJmx="true"

Re: Quartz and enrich seem not to work together...

2013-07-23 Thread roger_rabbit
Claus, thanks for your tip. That was that little thingy I was looking for. I should have read the "noop" option closer... "rtfm" should be my mantra! Roger. -- View this message in context: http://camel.465427.n5.nabble.com/Quartz-and-enrich-seem-not-to-work-together-tp5736046p5736117.html Se

How to pass the http authentication token?

2013-07-23 Thread zerdo
Hello, How to pass the http authentication token? If it could cause the browser POST then he or she would look like this: http://cms.mycompany.com.pl/myapi/delete_condition/ffad56ea-c000?token=xyz Is it enough to pass the token as a parameter or header? If so, what is to be heading? Please help

Re: How to pass the http authentication token?

2013-07-23 Thread Bilgin Ibryam
If you are using the http4 component, have a look at Configuring URI Parameters section on the docs http://camel.apache.org/http4.html HTH Bilgin On 23 July 2013 13:11, zerdo wrote: > Hello, > How to pass the http authentication token? > > If it could cause the browser POST then he or she woul

Re: Camel routing issue

2013-07-23 Thread Claus Ibsen
Hi Have you read about the preserveMessageQos option? http://camel.apache.org/jms On Tue, Jul 23, 2013 at 1:39 PM, prabumc...@gmail.com wrote: > Hi > > I need one help,I want set JMSExpiration value before routing messages. > > i tried setting JMSExpiration in .setHeader > > But it didn't work.I

Re: Leveraging CXF Asynchronous processing when MEP is InOut

2013-07-23 Thread Claus Ibsen
On Tue, Jul 23, 2013 at 11:57 AM, Edwin wrote: > Since my cxf call has an MEP of InOut, is it possible to achieve the cxf > asynchronous behavior? > > Or is the cxf asynchronous behaviour only associated with an MEP of InOnly? > No camel-cxf is async by default, unless you force it to be synchron

Re: Camel routing issue

2013-07-23 Thread prabumc...@gmail.com
if you don't mind can you provide sample how to use this property to set jmsExpiration time for messages *Thanks* Prabu.N On Tue, Jul 23, 2013 at 6:48 PM, Claus Ibsen-2 [via Camel] < ml-node+s465427n5736125...@n5.nabble.com> wrote: > Hi > > Have you read about the preserveMessageQos option? >

Re: After camelContext shutdown, is any way to exit the Java main() method?

2013-07-23 Thread Claus Ibsen
You should give Camel time to shutdown graceful instead of forcing a 1 sec timeout http://camel.apache.org/graceful-shutdown.html On Tue, Jul 23, 2013 at 12:08 PM, SyedBhai wrote: > Hi. > I am having a simple class with main(). In main() I am executing the > following code: > try { >

Re: Is it possible to import Endpoints from a xml file like routeContextRef?

2013-07-23 Thread bonnahu
Hey Claus, Thanks for your response again. Yeah, that's I am looking for, since I have a bunch of , which will be included in several projects. I am thinking to do it in this way, 1. Put the id and uri of endpoint in a properties file 2. In a init route, read the properties file then dynamically

No Consumer available Exception

2013-07-23 Thread Jothi
Camel Users, I face a strange error when I tried to run one of my routes. Why I say strange is because, I can see that the consumer for one of the routes is started, but it still fails when run! Here is the route; // Process and send to the aggregator from(DIRECT_PROCESS_REF_DATA

Re: Probleme with startorder

2013-07-23 Thread Bovas
Thanks Claus, it works perfectly - regards, Bovas -- View this message in context: http://camel.465427.n5.nabble.com/Probleme-with-startorder-tp5736034p5736134.html Sent from the Camel - Users mailing list archive at Nabble.com.

padded text and\or static classes in velocity template of velocity component

2013-07-23 Thread javamonkey79
I am trying to pad some text in a velocity template in the camel component. To do this, I'd like to use the StringUtils class of apache commons. Per suggestions from other sources, I've tried this: public class StringUtilsHelper { public void addStringUtilsToExchange( final Exchange exchan

Re: No Consumer available Exception

2013-07-23 Thread Bilgin Ibryam
Strange, can you post the whole route file Bilgin On 23 July 2013 14:44, Jothi wrote: > Camel Users, > > I face a strange error when I tried to run one of my routes. Why I say > strange is because, I can see that the consumer for one of the routes is > started, but it still fails when run! > > H

Exponential BackOff ignored

2013-07-23 Thread zzkozak
Hi, I'm using the following route and wonder why the exponential back off isn't working. Each call to the *orderServiceBean* is performed exactly after 4Minutes (24ms) and not as expected after 4,8,16min, etc. Thanks in advance, Marcin -- View this message in context: http://camel.465

Re: Camel routing issue

2013-07-23 Thread prabumc...@gmail.com
Please kindly provide some sample code. *Thanks* Prabu.N On Tue, Jul 23, 2013 at 7:04 PM, Prabu wrote: > if you don't mind can you provide sample how to use this property to set > jmsExpiration time for messages > > > *Thanks* > Prabu.N > > > On Tue, Jul 23, 2013 at 6:48 PM, Claus Ibsen-2 [via

Re: No Consumer available Exception

2013-07-23 Thread Claus Ibsen
Sounds like the routes are started in wrong order. You can try dicate the order. http://camel.apache.org/configuring-route-startup-ordering-and-autostartup.html On Tue, Jul 23, 2013 at 5:06 PM, Bilgin Ibryam wrote: > Strange, can you post the whole route file > > Bilgin > > On 23 July 2013 14:4

Re: No Consumer available Exception

2013-07-23 Thread Jothi
That's the whole route what I have posted above! It is definitely strange as I have another route that does the same thing and that route worked perfectly fine! I tried changing the names of the route id, direct constants and its values, but of no help! What is even more strange is that I can see

Re: Exponential BackOff ignored

2013-07-23 Thread Claus Ibsen
Hi Try with a newer versions as we fix stuff in them, as we say here http://camel.apache.org/support On Tue, Jul 23, 2013 at 5:13 PM, zzkozak wrote: > Hi, > > I'm using the following route and wonder why the exponential back off isn't > working. Each call to the *orderServiceBean* is performed

Re: padded text and\or static classes in velocity template of velocity component

2013-07-23 Thread javamonkey79
This post helped me get it: http://camel.465427.n5.nabble.com/How-to-use-escape-tool-esc-xml-somestrwithspclchars-in-camel-velocity-template-td5505668.html This works for me: in template: $headers.StringUtils.leftPad("foo", 10) java: public class StringUtilsHelper { public void addStrin

MINA and Buffering

2013-07-23 Thread Ephemeris Lappis
Hello. After few tests with MINA using TCP, I've observed that MINA or Camel seem to put a lot of data in a buffer. In some cases with the sync option set to false, injecting big flows of data to my TCP server, thousands of messages seem to be processed many minutes late. All seem ok at the end, w

Re: After camelContext shutdown, is any way to exit the Java main() method?

2013-07-23 Thread SyedBhai
Hello Claus, As per your instruction I removed all the statements that force the shutdown of camelcontext. I let the camel take its time and shutdown gracefully. To my surprise even though the default timeout is 300 secs I gave the application about ten minutes. Still it did not shutdown and

Re: Camel in Openshift

2013-07-23 Thread wcpolicarpio
Hi James, That would be awesome! I will definitely anticipate your new cartridge. I saw the hawt.io interface and it looks cool. (http://macstrac.blogspot.co.uk/2013/06/introducing-apache-camel-based-open.html). I have a follow-up question. Is it possible to deploy the camel route in a jboss/tom

Re: How to Pause Quartz Componenent

2013-07-23 Thread Christian Müller
I would suggest using camelContext.stopRoute("MainRoute"). Best, Christian Am 23.07.2013 11:48 schrieb "Dayakar" : > Hi, > > I am using Quartz Component which run Daily at 20:00 I configured it as > > from("quartz://myGroup/myTimerName?cron=0+0+20+1/1+*+?+*").routeid("MainRoute").to("jms:queue:o

Re: Camel routing issue

2013-07-23 Thread Christian Müller
It's not really so difficult to find an example, if you spend only a few minutes: https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD Best

Re: After camelContext shutdown, is any way to exit the Java main() method?

2013-07-23 Thread Christian Posta
Do you want to post your complete main function? As you've posted it, I cannot reproduce... On Tue, Jul 23, 2013 at 2:39 PM, SyedBhai wrote: > Hello Claus, > As per your instruction I removed all the statements that force the > shutdown of camelcontext. > I let the camel take its time and sh

Re: MINA and Buffering

2013-07-23 Thread Christian Posta
Is it something that happens consistently? Or randomly? Maybe you can post your route and I can take a look. On Tue, Jul 23, 2013 at 12:40 PM, Ephemeris Lappis < ephemeris.lap...@gmail.com> wrote: > Hello. > > After few tests with MINA using TCP, I've observed that MINA or Camel seem > to put a

Re: After camelContext shutdown, is any way to exit the Java main() method?

2013-07-23 Thread SyedBhai
public static void main(String str[]) { try { CamelContext cc = new DefaultCamelContext(); cc.addRoutes(new RouteBuilder() { public void configure() { from("direct:start1"). to("cxf://http://localhost:80

Re: Camel in Openshift

2013-07-23 Thread James Strachan
On 23 July 2013 20:13, wcpolicarpio wrote: > Hi James, > > That would be awesome! I will definitely anticipate your new cartridge. Cool, I'll reply to this thread when I've got a blog on how to get started. > I saw the hawt.io interface and it looks cool. Thanks! > (http://macstrac.blogspot.

Re: MINA and Buffering

2013-07-23 Thread Ephemeris Lappis
Hello. It seems to do it always. Here is the part of the blueprint. The test just takes received data and puts them into a map. In the future project, the map will be a more realistic external OSGi service that will store, process and manage big counts of rows (about 10 millions rows)... In my te

Camel File Polling Exception

2013-07-23 Thread Jothi
When I read several files from a directory using the file component, should any exception occur, I can see in the log that Camel tries to read the files multiple times and constantly writes the exception to the log and eventually run into a OutOfMemory problem. How to instruct Camel to stop reading

Re: No Consumer available Exception

2013-07-23 Thread Jothi
What even confuses me is that I have another route that looks more or less the same, the only difference being a couple of more choice blocks. That route works perfectly fine. Spent about 3 hours trying to analyze the problem but fruitless. I'm calling it a day! Will work on it with a fresh mind to

Re: No Consumer available Exception

2013-07-23 Thread Jothi
Seriously, I do not understand what is happening with this particular route! I added the startup order and it did not help either. Baffled now! -- View this message in context: http://camel.465427.n5.nabble.com/No-Consumer-available-Exception-tp5736133p5736146.html Sent from the Camel - Users m