Re: Re: Issue with timer:// route, NoSuchBeanException on route shutdown

2015-05-26 Thread Claus Ibsen
Try remove the depends-on, not sure if blueprint shutdown in reverse order and therefore the bean before camel etc. On Tue, May 26, 2015 at 9:56 PM, Martin Lichtin wrote: > Using Blueprint in an OSGi bundle: > > class="myPkg.MyBean"> > > > http://camel.apache.org/schema/blueprint";

Re: What is the best way to implement "RunLevel" equivalent functionality with camel.

2015-05-26 Thread Claus Ibsen
Hi You can use .description to set a route description. But there is no key/value map that you can associate to a route. You could also look at startup order and assign 1xx for level 1, 2xx for level 2, etc. http://camel.apache.org/configuring-route-startup-ordering-and-autostartup.html On Tue,

Re: Re: Issue with timer:// route, NoSuchBeanException on route shutdown

2015-05-26 Thread Martin Lichtin
Using Blueprint in an OSGi bundle: class="myPkg.MyBean"> http://camel.apache.org/schema/blueprint"; xsi:schemaLocation="http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"; id="myRouteContext" depends-on="myBean">

Re: What is the best way to implement "RunLevel" equivalent functionality with camel.

2015-05-26 Thread Mark Frazier
You can put them in the exchange headers. > On May 26, 2015, at 12:10 PM, Zoltan Farkas > wrote: > > Thank you, > > is there a way to attach some metadata(attributes) to a camel route? > > > —Z > > > >> On May 26, 2015, at 3:48 AM, Henryk Konsek wrote: >> >> Hi Zoltan, >> >> You can u

Re: Re: Issue with timer:// route, NoSuchBeanException on route shutdown

2015-05-26 Thread Martin Lichtin
Using Blueprint in an OSGi bundle: http://camel.apache.org/schema/blueprint"; xsi:schemaLocation="http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"; id="myRouteContext" depends-on="myBean">

Re: What is the best way to implement "RunLevel" equivalent functionality with camel.

2015-05-26 Thread Zoltan Farkas
Thank you, is there a way to attach some metadata(attributes) to a camel route? —Z > On May 26, 2015, at 3:48 AM, Henryk Konsek wrote: > > Hi Zoltan, > > You can use splitter with conjunction with the Control Bus [1] to achieve > this. > > from("direct:splitAndStart"). > split().body().

Handling header-less responses

2015-05-26 Thread erd
Hello all, I have a route which GETs JSON from an external HTTP service. Some of the servers do not respond with any headers, resulting in httpclient.clientProtocolException. what is the best way to have the route assume a response header like the following? HTTP/1.1 200 OK Content-Type: applicati

Re: route <-> XML <-> route

2015-05-26 Thread Pontus Ullgren
On Tue, 26 May 2015 at 18:10 Tim Dudgeon wrote: > On 26/05/2015 16:55, Pontus Ullgren wrote: > > Depending on the registry you use you can create the beans in java and > add > > them to the registry in runtime before you add (and start) the route in > the > > context. > Yes, that's what I figured

Re: route <-> XML <-> route

2015-05-26 Thread Tim Dudgeon
On 26/05/2015 16:55, Pontus Ullgren wrote: Depending on the registry you use you can create the beans in java and add them to the registry in runtime before you add (and start) the route in the context. Yes, that's what I figured. Its the exact mechanism for doing so that I'm trying to figure ou

Re: How to suppress exceptions from @Jsonpath expressions?

2015-05-26 Thread Preben.Asmussen
Hi Claus Created https://issues.apache.org/jira/browse/CAMEL-8799. See comments Best, Preben -- View this message in context: http://camel.465427.n5.nabble.com/How-to-suppress-exceptions-from-Jsonpath-expressions-tp5767384p5767497.html Sent from the Camel - Users mailing list archive at Nab

Re: route <-> XML <-> route

2015-05-26 Thread Pontus Ullgren
Depending on the registry you use you can create the beans in java and add them to the registry in runtime before you add (and start) the route in the context. I have some example code on how to do this using a spring registry. However since you say you are not using spring you will have to figure

Re: On exception notify first error.

2015-05-26 Thread Cecilio Alvarez
Thanks for the help. I came with the following solution: public class ErrorHandlerNotifier implements Processor{ Logger logger = LoggerFactory.getLogger(ErrorHandlerNotifier.class); private String destination; private final String DEFAULT_DESTINATION = "activemq:MAILING";

RE: Synchronous one time use of endpoint

2015-05-26 Thread Justin Rosenberg
Claus, I know how to filter. My question is more related on how I set up the route or use the API for a one-time dynamically generated route. Henryk Konsek recommended I check out the ConsumerTemplate API. This might be what I'm looking for. ~Justin -Original Message- From: Claus I

Re: route <-> XML <-> route

2015-05-26 Thread Tim Dudgeon
The beans are defined at runtime, so can't go in the spring xml that is used on startup (and I'm not actually using spring, though could do if essential). I need to provide the route definition plus any beans it uses at runtime, after the context has started. Tim On 26/05/2015 15:23, Claus Ib

Re: route <-> XML <-> route

2015-05-26 Thread Claus Ibsen
Hi If you are using spring xml then the beans need to go in the spring xml file as . You may be able to add those beans later using some spring java api. On Tue, May 26, 2015 at 2:21 PM, Tim Dudgeon wrote: > Sorry, not clear on this. Where does the element go? > The XML generated from the rout

Re: Using shared Netty configuration with Rest DSL

2015-05-26 Thread Claus Ibsen
Hi componentProperty is for setting options on the component level. It becomes clearer in the future when the component docs is auto generated based on the source code, so all options is listed and up to date. Today its a manual process in wiki for the docs. On Tue, May 26, 2015 at 2:34 PM, Al

Re: Using shared Netty configuration with Rest DSL

2015-05-26 Thread Alex Soto
Hi, It appears to be working with the following:

Re: route <-> XML <-> route

2015-05-26 Thread Tim Dudgeon
Sorry, not clear on this. Where does the element go? The XML generated from the route looks like this: http://camel.apache.org/schema/spring";> The element would normally be part of the spring XML, but outside the routes definition looking something like this:

Re: How to suppress exceptions from @Jsonpath expressions?

2015-05-26 Thread Claus Ibsen
Hi Yeah we can add some option to turn this option on | off. Preben a JIRA and PR is welcome. On Mon, May 25, 2015 at 12:41 PM, Preben.Asmussen wrote: > Hi > > Currently it's seems not possible to have optional jsonpath parameters on a > bean since the component will throw an PathNotFoundExcepti

Re: Camel 2.15.2, weaveAddLast throwing UnsupportedOperation when route have a ChoiceDefinition

2015-05-26 Thread Claus Ibsen
Hi Yeah we should add support for this in the choice. The add last should add it after the choice. You are welcome to log a JIRA http://camel.apache.org/support On Tue, May 26, 2015 at 10:50 AM, gterral wrote: > Hi everybody, > > I'm currently upgrading from Camel 2.14.1 to 2.15.2, after the upg

Re: Issue with timer:// route, NoSuchBeanException on route shutdown

2015-05-26 Thread Claus Ibsen
Hi Are you using a spring xml file? Then its spring app context that is the registry. Camel does not remove any beans from it. Its spring that does that. So maybe you have some depends-on spring attribute order wrong or something. On Tue, May 26, 2015 at 12:41 PM, Martin Lichtin wrote: > Is anyo

Re: Exchange setBody not working with Camel 2.15.2

2015-05-26 Thread Claus Ibsen
Hi Use the message translator eip to set a null message. If you work on the exchange directly you likely need more work as its done here https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/processor/SetBodyProcessor.java#L56 On Tue, May 26, 2015 at 1:27 PM, geppo

Re: Exchange setBody not working with Camel 2.15.2

2015-05-26 Thread geppo
P.S. I've tried different versions of Camel. The bug seems to have been introduced between version 2.14.2 and version 2.15.0 -- View this message in context: http://camel.465427.n5.nabble.com/Exchange-setBody-not-working-with-Camel-2-15-2-tp5767420p5767474.html Sent from the Camel - Users maili

Re: Exchange setBody not working with Camel 2.15.2

2015-05-26 Thread geppo
Thanks hekonsek for the reply. I'll do it as soon as I can (I need to cleanup the code from all references to my company). I think the problem is on how the new Camel handles the command: exchange.getIn().setBody(null) where: - exchange is DefaultExchange - exchange.getIn() is GenericFileMess

Re: [hdfs2 producer] dynamically defined path to a target file

2015-05-26 Thread Grzegorz Grzybek
Hi Mikhail Great - we love contributions - please send a patch or even create Pull Request at https://github.com/apache/camel/pulls I can check this as well. best regards Grzegorz Grzybek 2015-05-26 13:05 GMT+02:00 Mikhail Pryakhin : > Hi guys! > > I'm currently working with HDFS2 producer and

[hdfs2 producer] dynamically defined path to a target file

2015-05-26 Thread Mikhail Pryakhin
Hi guys! I'm currently working with HDFS2 producer and I've got a case when I need to dynamically specify path to a target file. Let's say my path to a destination file consists of two parts: The first one is a static path and the second one is dynamically defined path which depends on realtime

Issue with timer:// route, NoSuchBeanException on route shutdown

2015-05-26 Thread Martin Lichtin
Is anyone else seeing this issue on shutting down a simple timer-based route such as On shutting down, it reports 2015-05-22 01:20:14,970 | INFO | FelixStartLevel | DefaultShutdownStrategy | mel.impl.DefaultShutdownStrategy

Re: Meaning of synchronous for a from()

2015-05-26 Thread Claus Ibsen
On Fri, May 22, 2015 at 2:08 PM, Victor NOËL wrote: > Hi, > > I have trouble of understanding the meaning of "synchronous" parameter on a > from() in a route. > > Does it mean the whole route will be execute with the syncronous API? > No it means the thread in the consumer will wait. But mid rou

Re: Using shared Netty configuration with Rest DSL

2015-05-26 Thread Claus Ibsen
Hi Ah maybe there is a glitch configuring those on the component level? You are welcome to log a JIRA so we wont forget. On the component level makes it configurable once for end users, when they eg use it with regular Camel routes, and not as much the rest-dsl. On Fri, May 22, 2015 at 2:47 PM,

Re: Discard Obsolete Messages After Redelivery

2015-05-26 Thread Claus Ibsen
Hi Or use a message filter and implement the logic to detect if the message id is still valid or not. http://camel.apache.org/message-filter.html On Tue, May 26, 2015 at 9:42 AM, Willem Jiang wrote: > I’m afraid you have to implement your version of IdempotentRepository, as the > requirement is

Camel 2.15.2, weaveAddLast throwing UnsupportedOperation when route have a ChoiceDefinition

2015-05-26 Thread gterral
Hi everybody, I'm currently upgrading from Camel 2.14.1 to 2.15.2, after the upgrade some of my test are failing. My route is: My test contains : The weaveAddLast is failing with the following stackTrace: java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractL

Re: Web Srevice exposed over https not working

2015-05-26 Thread Willem Jiang
You may need to check your firewall setting and enable the SSL debug could help you to trace the reason of lost the connection. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo:

Re: What is the best way to implement "RunLevel" equivalent functionality with camel.

2015-05-26 Thread Henryk Konsek
Hi Zoltan, You can use splitter with conjunction with the Control Bus [1] to achieve this. from("direct:splitAndStart"). split().body().setHeader("routeId", body() ).to("controlbus:route?&action=start"); from("direct:startLevel1"). setBody().constant(Arrays.asList("route1", "route2")). to(

Re: Discard Obsolete Messages After Redelivery

2015-05-26 Thread Willem Jiang
I’m afraid you have to implement your version of IdempotentRepository, as the requirement is quite different. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May

Re: Discard Obsolete Messages After Redelivery

2015-05-26 Thread noone100
Hi Willem Thanks for your answer! This filter should be able to skip out-of-order messages having the same correlation id but an older timestamp in a persistent manner, that's why I thought about a FileIdempotentRepository but this repo cannot track an id and a timestamp in conjunction. Is there

Re: route <-> XML <-> route

2015-05-26 Thread Claus Ibsen
Hi Yeah On Tue, May 26, 2015 at 9:02 AM, Tim Dudgeon wrote: > Yes, but how to specify the bean that is referenced? Can that be specified > in the XML using a bean element as if it was being using on startup, or does > it need to be added to the registry "manually"? > > Tim > > > On 26/05/2015 0

Re: Discard Obsolete Messages After Redelivery

2015-05-26 Thread Willem Jiang
Hi, I think you can consider to write a filter which just tracks the last timestamp (you may need a lock when changing the timestamp). -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang

Re: ERROR: Cannot find any registered HttpDestinationFactory from the Bus.

2015-05-26 Thread Willem Jiang
CXF http transport looks up the HttpDestinationFactory for (Jetty or Netty) if the address is start with “http://"; or "https://“. If you don’t put those jar into the class patch, you will get the error. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjian

Re: Content Based Router : Java DSL is not working

2015-05-26 Thread Willem Jiang
It looks like your Predicate is a static now, which cannot take the message header as parameter. Please take a look at the Bean Language[1], it shows you how to write a right one. [1]http://camel.apache.org/bean-language.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: htt

Re: route <-> XML <-> route

2015-05-26 Thread Tim Dudgeon
Yes, but how to specify the bean that is referenced? Can that be specified in the XML using a bean element as if it was being using on startup, or does it need to be added to the registry "manually"? Tim On 26/05/2015 07:49, Claus Ibsen wrote: On Mon, May 25, 2015 at 3:01 PM, Tim Dudgeon wro