Re: retryWhile predicate is not called on ftp connection failure

2015-02-11 Thread Claus Ibsen
It works a bit different when its from vs to. The ftp consumer (eg from) is scheduled based, and you cannot configure redelivery and whatnot using onException. It uses the option maximumReconnectAttempts as the max number of connection attempts before failing. You cannot use onException to change

Re: retryWhile predicate is not called on ftp connection failure

2015-02-11 Thread ekz
Yes, GenericFileOperationFailedException is thrown. Trying with Exception.class did not change the situation. onException(Exception.class) .handled(true) .retryWhile(new Predicate() { @Override public boolean matches(Exchange exchange) { System.out

Re: RejectedExecutionException: Task rejected due queue size limit reached

2015-02-11 Thread Behrad
I don't think it be a SEDA queue size problem, since my SEDA endpoint queue size is a very big number in logs, there should be something with redelivery/errorHandler task queue !? 2015-02-12 10:23 GMT+03:30 Taariq Levack : > Hi > > SEDA queue size is unbounded by default, you can try the unit tes

Re: RejectedExecutionException: Task rejected due queue size limit reached

2015-02-11 Thread Taariq Levack
Hi SEDA queue size is unbounded by default, you can try the unit test[1] with a very large number, works for me in 2.14.1 and trunk. Check all your endpoints with that name, the first one to load is setting the size. [1] https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apa

RejectedExecutionException: Task rejected due queue size limit reached

2015-02-11 Thread Behrad
When my SEDA producer peaks seems I'm getting ExecusionService queue limit with this trace: at org.apache.camel.util.concurrent.SizedScheduledExecutorService.schedule(SizedScheduledExecutorService.java:74) ~[org.apache.camel.camel-core-2.14.0.jar:2.14.0] at org.apache.camel.processor.RedeliveryErr

Re: retryWhile predicate is not called on ftp connection failure

2015-02-11 Thread Morgan Hautman
Are you sure "GenericFileOperationFailedException.class" is thrown from the producer? Because it could be thrown by a producer("from()") but not by a consumer("to()") Try to catch Exception.class and log the exception you get with |Exchange.EXCEPTION_CAUGHT or some simple exceptions listed h

Re: SPAM: Re: How to not hardcode MaxRedeliveries in a route

2015-02-11 Thread Claus Ibsen
Hi There was maybe a but about changing the max redelivery counter - you can try with latest release / SNAPSHOT. And there is also retryWhile which returns a boolean then you can control the logic there also. On Wed, Feb 11, 2015 at 6:51 PM, Rafiq, Adnan wrote: > Thanks, Claus. > > I'm assuming

RE: SPAM: Re: How to not hardcode MaxRedeliveries in a route

2015-02-11 Thread Rafiq, Adnan
Thanks, Claus. I'm assuming that I must be doing something wrong here. I am trying to set the max redelivery to 3 in the example below, but it looks like it does not have any effect. Camel only tries to redeliver it once instead of overriding the REDELIVERY_MAX_COUNTER to 3. Here's the code:

Re: retryWhile predicate is not called on ftp connection failure

2015-02-11 Thread ekz
Hi Morgan, Thanks for the quick reply. I looked at the page you suggested and also tried with handler, But the strange thing is: I have another route in which i connect to ftp too. But that route works as i expected and retryWhile predicate is checked. Predicate is considered: from("direct

Re: retryWhile predicate is not called on ftp connection failure

2015-02-11 Thread Morgan Hautman
Hello, Take a look at : https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java Hope it helps! Regards, Morgan On 11/02/2015 13:14, ekz wrote: Hi, I have an FTP route for consuming files and working fine. Wh

Re: Enrich/poolEnrich how to work with for file component ?

2015-02-11 Thread fliot33
Thanks Claus. -- View this message in context: http://camel.465427.n5.nabble.com/Enrich-poolEnrich-how-to-work-with-for-file-component-tp5762573p5762605.html Sent from the Camel - Users mailing list archive at Nabble.com.

retryWhile predicate is not called on ftp connection failure

2015-02-11 Thread ekz
Hi, I have an FTP route for consuming files and working fine. When the FTP fails to connect I want to catch the exception, try for some more and later give up retrying connection attempt. Here is my routes, when i debug, process in onException is working and printing "in process", but predicate i

Using metricsRoutePolicyFactory across multiple modules

2015-02-11 Thread GreeBo
Hey, I have a multi module maven project consisting of: a camel-cxf webservice, a camel-api and a POJO api I have the metricsRoutePolicyFactory bean defined in the context of both camel modules but when I run the camel-cxf webservice (via Jetty) I dont see the metrics (or anything) from the camel

Re: Route with JMS down

2015-02-11 Thread Jakub Korab
Your exception seems to indicate that you haven't configured your ActiveMQConnectionFactory correctly. What the error shows is that you have connected it to: tcp://10.0.0.97:61616 What will happen in that configuration is that when the connection drops, the connection factory will remain in a

Re: How do I configure Apache Camel to sequentially execute processes based on a trigger file?

2015-02-11 Thread Jakub Korab
This sounds like a job for the dynamic router pattern, it's kind of like a smart loop that lets you decide what to do next based on the current state of the exchange. Depending on the last file to be loaded, you route to a subroute that consumes from the next file. https://camel.apache.org/dynamic

Re: How to not hardcode MaxRedeliveries in a route

2015-02-11 Thread Claus Ibsen
Hi Use onRedelivery to implement logic whether to redeliver or not. Then that logic can use headers and whatnot On Wed, Feb 11, 2015 at 12:43 AM, arafiq wrote: > Camel newbie here and still trying to learn the basics. I have a route based > on the HTT4 component where I have a MaxRedelivery opti

Re: Enrich/poolEnrich how to work with for file component ?

2015-02-11 Thread Claus Ibsen
Hi Enrich/PollEnrich cannot use the header. See the box about _data from current exchange .._ at http://camel.apache.org/content-enricher.html Instead to read a file just see the body to a java.io.File /somewhere On Tue, Feb 10, 2015 at 6:16 PM, fliot33 wrote: > This kind or routes don't work