RE: java dsl vs blueprint xml

2015-12-15 Thread raffi.onjava
Strange why the groovy DSL isn't more common; to me it looks much cleaner and elegant compared to Java and XML. Raffi -Original Message- From: souciance [mailto:souciance.eqdam.ras...@gmail.com] Sent: Tuesday, December 15, 2015 9:01 AM To: users@camel.apache.org Subject: java dsl vs blue

Re: Apache Camel as ETL

2015-12-15 Thread Bilgin Ibryam
This may give you some ideas http://stackoverflow.com/questions/20638680/camel-stop-when-there-are-no-files-in-the-folder B. On 15 December 2015 at 08:26, contactreji wrote: > Hi Folks > > We are trying to implement some ETL ( batch mode ) use cases. These jobs > should be running at certain sc

Using Message Headers & Body into Camel SQL Insert statement

2015-12-15 Thread Shiv
Hi, I want to insert a record in table using camel sql component and want to externalize the insert query in a properties file. Seems it is not working fine as simple expression in properties is not getting replaced by actual value. #Insert query in properties file - this is not working SQLInsertQ

Compatibilty of camel 2.13.x and karaf 2.3.x

2015-12-15 Thread Christian Schneider
I am trying to use camel 2.13.4 with karaf 2.3.9. The problem is that karaf http uses servlet API 2.5 while camel installs servlet API 3.0 for several components. So can camel 2.13.x be used with karaf 2.3.9? If it is not expected to work out of the box - Would it work by replacing the servlet

Re: java dsl vs blueprint xml

2015-12-15 Thread Christian Schneider
Btw. You can also combine this with the blueprint-maven-plugin from Aries. http://aries.apache.org/modules/blueprint-maven-plugin.html You still have to define the camel-context in a blueprint file but you can define all other beans using annotations. See: https://github.com/cschneider/Karaf-T

Re: How to dynamycally load file from ftp during route processing?

2015-12-15 Thread Claus Ibsen
No unless you write some java code and use a consumer template etc to build the uri to use. On Tue, Dec 15, 2015 at 3:37 PM, igor wrote: > I just tried the pollEnrich method, and it works, but my problem is that it > does not access any data from the current exchange till version 2.16. > > is the

Re: java dsl vs blueprint xml

2015-12-15 Thread souciance
By the way, if you do blend the two, how do you handle code for error handling, logging and similar parts? Do you put that in the routebuilder as well or in the blueprint? In essence, the blueprint just loads the bean and that is it, it just acts as a startup mechanism. -- View this message in c

Re: How to dynamycally load file from ftp during route processing?

2015-12-15 Thread igor
I just tried the pollEnrich method, and it works, but my problem is that it does not access any data from the current exchange till version 2.16. is there a way to achieve the same in 2.15.2? from("queue") .setProperty(FILE_NAME,body()) .pollEnrich("ftp:login@host?

Re: java dsl vs blueprint xml

2015-12-15 Thread souciance
Great example, thanks, I think that seems to be the best approach going forward. You basically get the best from both worlds. -- View this message in context: http://camel.465427.n5.nabble.com/java-dsl-vs-blueprint-xml-tp5775085p5775097.html Sent from the Camel - Users mailing list archive at N

Re: java dsl vs blueprint xml

2015-12-15 Thread Christian Schneider
Yes. here is an example: https://github.com/cschneider/Karaf-Tutorial/blob/master/camel/jms2rest/src/main/java/net/lr/tutorial/karaf/camel/jms2rest/Jms2RestRoute.java https://github.com/cschneider/Karaf-Tutorial/blob/master/camel/jms2rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml Chri

Re: java dsl vs blueprint xml

2015-12-15 Thread souciance
Yeah, I will probably blend the two approaches and use blueprint to register services and try to use the java dsl as much as possible. I haven't used the auto-deploy feature and that sounds awesome, although in this specific case we'll be using jenkins to build the jar files and in the second step

Re: java dsl vs blueprint xml

2015-12-15 Thread souciance
I have used direct-vm for that for some integrations, only difference is that with direct-vm you get multiple camel-context. I haven't tried your spring example in blueprint to see if it works though. -- View this message in context: http://camel.465427.n5.nabble.com/java-dsl-vs-blueprint-xml-

Re: java dsl vs blueprint xml

2015-12-15 Thread souciance
Thanks for the tip Christian. I haven't tried that before. So basically, just like any other bean you just "ref-it" and inside is a standard routebuilder. I will give it a go and try that. -- View this message in context: http://camel.465427.n5.nabble.com/java-dsl-vs-blueprint-xml-tp5775085p

Create endpoints in java to use in xml routes

2015-12-15 Thread mtkilbay
I've been trying to create endpoints in java and have those endpoints referenced in my xml routes but have been unsuccessful. I can do this in xml: and have the endpoint referenced in the routes: What i want to do is replace the xml endpoint declaration using java. I've tried something like

Re: java dsl vs blueprint xml

2015-12-15 Thread Daniel Lamb
As Christian suggested, blending the two is a good approach. I’ve done that where I’ve used blueprint to register services, but still use the java dsl for everything else. I wouldn’t worry about deployment as a factor for choosing between the two if you’re using karaf. Sure, dropping an xml f

Re: java dsl vs blueprint xml

2015-12-15 Thread Alexey Markevich
2) Unlike in the java dsl, you cannot split the routes into several files and import them. you can use http://camel.apache.org/direct-vm.html or http://camel.apache.org/vm.html to communicate beetwen different routes; you can share single Camel context between route builders (Spring example):

Re: java dsl vs blueprint xml

2015-12-15 Thread Christian Schneider
How about using blueprint to boot up camel context and still do the dsl in Java? You can refer to a bean that represents a RouteBuilder. Christian On 15.12.2015 15:01, souciance wrote: Hello, We are in a project and have evaluated both the java dsl and blueprint and we plan to deploy our rout

java dsl vs blueprint xml

2015-12-15 Thread souciance
Hello, We are in a project and have evaluated both the java dsl and blueprint and we plan to deploy our routes to Karaf. I understand that developing using blueprint will make the deployment easier. However I have some reservations about blueprint. 1) It is in xml and not java so thats additional

Re: Can we create custom route policy

2015-12-15 Thread zied123456
i want to do the same thing. have you found a solution ? -- View this message in context: http://camel.465427.n5.nabble.com/Can-we-create-custom-route-policy-tp5753970p5775084.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to dynamycally load file from ftp during route processing?

2015-12-15 Thread Claus Ibsen
See the content enricher eip, and the pollEnrich On Tue, Dec 15, 2015 at 1:07 PM, igor wrote: > I have a queue that accepts messages with file names, files are stored on > ftp. > The question is how to load the file during message processing? > > E.g. I have route like this: > > from(getProcesso

How to dynamycally load file from ftp during route processing?

2015-12-15 Thread igor
I have a queue that accepts messages with file names, files are stored on ftp. The question is how to load the file during message processing? E.g. I have route like this: from(getProcessorQueueName()) .setProperty(FILE_NAME,body()) // what should I call here so c

FTP sendEmptyMessageWhenIdle problem

2015-12-15 Thread Trp
Hi, I have the following route from("ftp://${host}?username=${username}&password=${password}&filter=#myFilter&noop=true&consumer.delay=1000&localWorkDirectory=/tmp&binary=true&passiveMode=true&disconnect=true&maxMessagesPerPoll=10&sendEmptyMessageWhenIdle=true";) and I treat like this:

Camel Shiro Security

2015-12-15 Thread zied123456
I'm using camel blueprint.xml and I want to secure routes with Shiro. I created the following class : public class ShiroSecurity { // Shiro configuration file path private static final String iniResourcePath = "shiro.ini"; // Object used to encrypt/decrypt the tok

Apache Camel as ETL

2015-12-15 Thread contactreji
Hi Folks We are trying to implement some ETL ( batch mode ) use cases. These jobs should be running at certain scheduled time and will be triggered from Chronos scheduling framework in Marathon. Once the job is finished, it should somehow intimate the Chronos as well so that it can terminate the