Re: Using ConsumerTemplate to fetch files.

2017-03-31 Thread Zoran Regvart
Hi Dilip, this to me seems to be an overly complicated solution to a simple problem. If I understand your problem correctly: you gather a file from ftp server1 and push to two different ftp servers, serverA and serverB, the serverA gets the transformed file and serverB gets the original file (backu

Re: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB

2017-03-31 Thread Zoran Regvart
Hi Ronny, yeah, I just tried to explain what happens, and you can reason for yourself by looking at the source code I linked to, so if you don't specify `CamelSqlRetrieveGeneratedKeys` header and the PreparedStatement::execute returns false (like for INSERT statement) then output message is not cre

Re: Curious routing case

2017-03-31 Thread Zoran Regvart
Hi Artur, have a look at Camel EIP page[1], what you describe sounds to me like Resequencer and Content based router patterns, zoran [1] https://camel.apache.org/eip.html On Fri, Mar 31, 2017 at 5:08 PM, Artur Jablonski wrote: > Hello. > > I wonder if someone could push me in the right directio

RE: Camel instanciated as null

2017-03-31 Thread mtod09
I’m using Artemis 2.0 and Karaf 4.1.0 doing a quick search I did not see any import in the Artemis MANIFEST.MF files. From: Quinn Stevenson [via Camel] [mailto:ml-node+s465427n5796787...@n5.nabble.com] Sent: Friday, March 31, 2017 8:06 AM To: Mike Tod Subject: Re: Camel instanciated as null Yo

Re: Curious routing case

2017-03-31 Thread Artur Jablonski
Hmmm. I am getting messages from Amazon sqs and can't change it. Let's say I want to see if I can do it in Camel without putting another messaging system in between. Interesting feature of amq though. Thx! On 31 Mar 2017 5:15 p.m., "Quinn Stevenson" wrote: I’d probably use ActiveMQ Message Grou

Re: Curious routing case

2017-03-31 Thread Quinn Stevenson
I’d probably use ActiveMQ Message Groups for this http://activemq.apache.org/message-groups.html > On Mar 31, 2017, at 9:08 AM, Artur Jablonski wrote: > > Hello. > > I wonder if someone could push me in the right direction trying to express > q

Re: Using rollback() inside onException

2017-03-31 Thread Quinn Stevenson
I don’t this this would make sense for handling java.lang.Exception - I think you’re right about Camel doing the same action by default. I guess if there was some other exception you were handling (i.e. handled(true)), you may want to call rollback - but I can’t think of a really good example r

Curious routing case

2017-03-31 Thread Artur Jablonski
Hello. I wonder if someone could push me in the right direction trying to express quite curious case in Camel route. Imagine there's a stream of messages some of which can be processed in parallel and some have to be processed serially. You can group the messages that require serial processing to

Re: Camel instanciated as null

2017-03-31 Thread Quinn Stevenson
You’re absolutely correct about the bundle import - if you’re loading the blueprint via the deploy folder, Karaf is creating a bundle for you based on what it sees in the Blueprint. If you’re still seeing the same resolution error (about the org.apache.activemq package) look at the MANIFEST.MF

Re: Using ConsumerTemplate to fetch files.

2017-03-31 Thread dilip.pashupathi
Hi, I was working with something similar to this problem. But I am not able to capture the exceptions properly. Setps: 1. Download the existing file from the FTP 2. Push the file to backup folder and append the file name with current date 3. Push a new file to the FTP which has a complete new

Re: [Urgent] Same file getting downloads from multiple instances

2017-03-31 Thread chandresh pancholi
Thank you so much for saving my day. :) :) On Fri, Mar 31, 2017 at 3:11 PM, Zoran Regvart wrote: > Hi Chandresh, > have a look at Idempotent Consumer EIP[1] pattern, > > zoran > > [1] https://camel.apache.org/idempotent-consumer.html > > On Fri, Mar 31, 2017 at 11:23 AM, chandresh pancholi > wr

Using rollback() inside onException

2017-03-31 Thread Martin Lichtin
Hi Wanted to ask, what would be a reason to explicitly call rollback() in an onException(). For example, would this make sense? .onException(Exception.class).rollback().end() I'm under the expression above line could just be left out, as Camel anyway lets the exception up and that will caus

RE: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB

2017-03-31 Thread Ronny Aerts
Hello, Even if my sql insert would return a resultset (which looks strange to me for an insert), I don't need it because I still need to have the original body. Therefore I tried with the outputHeader option not to overwrite the body. I repeat that there is a difference when working with the C

Re: Camel - No component found with scheme:mybatis

2017-03-31 Thread Zoran Regvart
Hi, I would write integration tests with all the magic provided by camel starters and spring boot test starter, so with this dependencies: org.apache.camel camel-mybatis-starter ${camel.version} org.springframework.boot spring-boot-starter-test test junit junit

Re: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB

2017-03-31 Thread Zoran Regvart
Hi Ronny, from what I can see from the SqlProducer source code the body is set if the PreparedStatement::execute method returns `true`[1]. I could be reading this wrong, but to me it seems that you're using insert/update statement that does not return a ResultSet, so in that case the body will be n

Re: [Urgent] Same file getting downloads from multiple instances

2017-03-31 Thread Zoran Regvart
Hi Chandresh, have a look at Idempotent Consumer EIP[1] pattern, zoran [1] https://camel.apache.org/idempotent-consumer.html On Fri, Mar 31, 2017 at 11:23 AM, chandresh pancholi wrote: > Hi, > > I am running Apache camel on 3 Kubernetes pods. Camel consumes file from > FTP directory. These pods

[Urgent] Same file getting downloads from multiple instances

2017-03-31 Thread chandresh pancholi
Hi, I am running Apache camel on 3 Kubernetes pods. Camel consumes file from FTP directory. These pods are downloading every file from same directory. Foe ex. directory /abc/def has 20 files every pods will download these 20 files.If one router downloads a file another router in another pods shoul

camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB

2017-03-31 Thread Ronny Aerts
Hello integrations community, I have a route (camel 2.17.6) where I need to insert a record into a MariaDB database and I need to capture the generated id of the record. I therefore set the CamelSqlRetrieveGeneratedKeys header to true. The record is inserted correctly and the id generated BUT t