Re: [ANNOUNCEMENT] Apache Camel 2.14.4 Released

2015-11-12 Thread Andrea Cosentino
Thank you very much Gregor :-) --  Andrea Cosentino  -Apache Camel PMC Member   Email: ancosen1...@yahoo.com  Twitter: @oscerd2  Github: oscerd  On Wednesday, November 11, 2015 11:56 PM, Gregor Zurowski wrote: The Apache Camel community announces the

Start/Stop CamelContext

2015-11-12 Thread Sashika
Hi, I'm in need to load some camel route attributes like file paths etc from the database and I'm initializing CamelContext from within spring. Also I use java DSL rather than XML DSL. I need camel to pickup the new values if I change those in the database. 1. Do I have to restart the camel contex

cxfendpoint consumer fails for certain WS soap calls (2.16.0) - nullpoint exception

2015-11-12 Thread bocamel
--- org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: log\acme\uat\.\2015-11-12\failed_messages\20151112-222445902.xml at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:292) at

Messages remain unacknowledged when exception thrown during RabbitMQ InOut

2015-11-12 Thread E Wong
Hello, We’re using the new rabbitMQ InOut feature in camel version 2.16.0 (with rabbitMQ v3.5.5) and have set up a flow like the following: Producer -> route1 -> rabbitMQ -> route2 -> rabbitMQ -> route3 -> service bean The service bean will return a response which the caller can choose whether o

Re: [ANNOUNCEMENT] Apache Camel 2.14.4 Released

2015-11-12 Thread Christian Müller
Great! On Wed, Nov 11, 2015 at 11:55 PM, Gregor Zurowski wrote: > The Apache Camel community announces the immediate availability of the > new patch release Apache Camel 2.14.4. This release contains 18 fixes > applied in the past few weeks by the community on the Camel 2.14.x > maintenance bran

Re: sftp endpoint is not as performant as expected

2015-11-12 Thread David Hoffer
I'm rather new to Camel, I'm assuming that if the SFTP source gets 900 files then the configured GenericFileExclusiveReadLockStrategy#acquireExclusiveReadLock will get called 900 times (once per file) every polling cycle. We too have a custom GenericFileExclusiveReadLockStrategy class that does no

Re: sftp endpoint is not as performant as expected

2015-11-12 Thread pmmerritt
We had a similar issue and traced it down to our usage of SftpChangedExclusiveReadLockStrategy which has a default check interval of 5 seconds which causes the polling to slow down waiting on files to finish being written, so max you can do is about 1 per 5 seconds. You can change the checkInterval

Problem with bean method calls and parameter types

2015-11-12 Thread Ryan Moquin
Hi, I'm using Camel 2.16.0 and trying to invoke a bean method using spring xml and having some issues. It seems like any time I try to invoke a bean method with a camel message body, camel tries to pass it as a string to the method (even though the method takes the class as an argument) I'm callin

Re: How to consume selected files from FTP endpoint?

2015-11-12 Thread Jack Frosch
Thanks Claus. I’ll take another run at this. — Jack Frosch On 11/12/15, 10:08 AM, "Claus Ibsen" wrote: >The filter should work while scanning for files - not after. eg if you >configure the filter on the ftp endpoint. There is a bunch of options >for filtering with include/exclude/ant/fi

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread codan84
Indeed the ClientSession of SshClient is being started, but never finished. Here are logs: 2015-11-12 16:39:08 [sshd-SshClient[68c05218]-nio2-thread-1] INFO o.a.s.c.session.ClientSessionImpl - Client session created 2015-11-12 16:39:08 [sshd-SshClient[68c05218]-nio2-thread-2] INFO o.a.s.c.sessio

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread Jakub Korab
If the threads are not being cleaned up, then it would seem that there is a leak in the SshClient library - this is confirmed by the screenshot of the threads that you attached on SO; they are all associated with SshClient. Can you verify that the client is in fact shutting down by set the logg

Create and call a route from Processor

2015-11-12 Thread Ishada
I googled out but I could not find any single insight about the problem. which is as follows Get a payload from JMS queue. get the details of the FTP server from the payload and archive all the files to a different location. Do some Processing on the payload data and store it as a tex

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread codan84
I tried your suggestion: ProducerTemplate producerTemplate = camelContext.createProducerTemplate(); producerTemplate.start(); String response = producerTemplate.requestBody("ssh://", String.class); producerTemplate.stop(); There is no difference. Still the numb

Re: How to consume selected files from FTP endpoint?

2015-11-12 Thread Claus Ibsen
The filter should work while scanning for files - not after. eg if you configure the filter on the ftp endpoint. There is a bunch of options for filtering with include/exclude/ant/filter etc. As ftp extends file you can find all the options in the file docs http://camel.apache.org/file2 On Thu, N

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread Jakub Korab
When you use the SSH producer endpoint in a to(..) statement, one instance of the endpoint is created within the route, its lifecycle is tied to the CamelContext and any resources used by it will be cleaned up at shutdown. The endpoint creates an instance of an SshClient (underlying library), a

How to consume selected files from FTP endpoint?

2015-11-12 Thread Jack Frosch
Our application consumes files from a folder on a supplier's FTP server. Unfortunately, the supplier uses the same folder for documents intended to be consumed by other applications. We’d like to consume (i.e. read, then delete or move) our files which can be identified by file name pattern, le

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread codan84
I have tried similar thing, but with sftp rather than ssh. Everything else is exactly the same: producerTemplate.sendBodyAndHeader( "sftp://_target_machine_url_?username=_username_"; + "&privateKeyFile=" + sshKeyPath + "&knownHostsFil

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread codan84
In that case starting/stopping it should in theory release threads, right? I tried start->requestBody->stop, without effect, still all threads keep running. I also tried to instantiate new template for each call, start it and stop at the end, still the same. -- View this message in context: htt

Re: How to test routes when using another TestRunner

2015-11-12 Thread souciance
I got it to finally work. Thanks a lot! Essentially you need to add this.setUp(); in the method that exist in the class that extends CamelBlueprintTestSupport. Then, your cucumber methods simply call the method..and that seems to do the trick. -- View this message in context: http://camel.465

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread Claus Ibsen
Maybe your bean with the producer template is not singleton scoped, so spring creates a new instance per message. On Thu, Nov 12, 2015 at 4:10 PM, codan84 wrote: > Hmm Interesting, this indeed fixes the problem. I am forced to use a > producerTemplate tho... Any ideas what am I doing wrong? > > >

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread codan84
Hmm Interesting, this indeed fixes the problem. I am forced to use a producerTemplate tho... Any ideas what am I doing wrong? -- View this message in context: http://camel.465427.n5.nabble.com/Spring-Boot-Camel-producerTemplate-ssh-spawning-thousands-of-threads-tp5773741p5773747.html Sent from

Re: How to improve throughput by grouping messages in a Transaction (in JMS)

2015-11-12 Thread Jakub Korab
Hi Deepak, The SJMS Batch component is included in the same library, but it's a different Component implementation specifically for consuming batches of messages. It works using local JMS transactions only, and does not integrate with XA. Jakub On 12/11/15 11:59, deepak_a wrote: Thanks Cla

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread Jakub Korab
To work out if it's your use of the ProducerTemplate, try the following route instead and see whether the leak persists: from("timer://foo?period=1000") .transform().constant("/home/_username_/some_temp_script.sh") .to("ssh://_remote.machine.url.here_?username=_username_&keyPairProvider=#key

Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread codan84
I did write a simple app using Spring Boot (1.2.7.RELEASE) and Apache Camel (2.15.0). The app is simple and has only 1 route: a timer will invoke a method on a bean every 1s. The method invoked will use ProducerTemplate to ssh into a remote machine, execute a small script, and print out the output

RE: SimpleBuilder usage in camel

2015-11-12 Thread Kasim Sert (Ibtech-Software Infrastructure)
Thank you it works the way you suggest. By the way I can use the code below to get customer pojo. Customer c = exchng.getIn().getBody(Customer.class); But when I use it in the SimpleBuilder i should use with array notation ? I did not get the reason well. Thank you anyway. -Original Mes

Re: SimpleBuilder usage in camel

2015-11-12 Thread Joakim Bjørnstad
Hello, In your example, ${body} is still of type Object[]. So it seems the SimpleBuilder evaluates it to null since getFirstName() is not a method on the Object[] in body. Try: System.out.println(SimpleBuilder.simple("Hello ${body[0].getFirstName()}").evaluate(exchng, String.class)); On Thu, No

SimpleBuilder usage in camel

2015-11-12 Thread Kasim Sert (Ibtech-Software Infrastructure)
Hi, I have following processor, when I run it from my route I get the following error. I know exchange body is not null and you can see it in logs below. What is wrong with my usage of SimpleBuilder here ? public class UpdateCustomerProcessor implements Processor { public static final Logg

Re: How to improve throughput by grouping messages in a Transaction (in JMS)

2015-11-12 Thread deepak_a
Thanks Claus, The dependency looks exactly same as SJMS, does this mean SJMS has been enhanced/re-branded as SJMS-batch? in version 2.16? org.apache.camel camel-sjms x.x.x Also can you pls point me to the Javadoc? I can only see Javadoc available for 2.15. I need to chec

Re: How to improve throughput by grouping messages in a Transaction (in JMS)

2015-11-12 Thread Claus Ibsen
See http://camel.apache.org/sjms-batch.html On Thu, Nov 12, 2015 at 12:24 PM, deepak_a wrote: > All, > > I read the below link - and it appears this lets me batch messages during > consumption or publication > http://camel.apache.org/sjms.html > i.e. (multiple messages in one transaction). > > Bu

Re: How to improve throughput by grouping messages in a Transaction (in JMS)

2015-11-12 Thread deepak_a
All, I read the below link - and it appears this lets me batch messages during consumption or publication http://camel.apache.org/sjms.html i.e. (multiple messages in one transaction). But unfortunately this does not support XA (I am using Atomikos as Transaction Manager) https://issues.apache.o

Re: Camel jetty response body

2015-11-12 Thread souciance
I figured out what the problem is. In the REST DSL I turned bindingMode off like: Then it worked. I could get the response back as OK instead of "OK" with quotes. Even with bindingMode set to auto, I would get "OK" instead of OK. I am not sure if this is a bug or not, at least with bindingM