log and set polling time information in exchange header

2018-03-05 Thread Davide Rossi
Hi everyone! I have a route like this *from("file://C:\\path\\to\\sourceDirectory?delay=1&directoryMustExist=true").routeId("myRouteId") .to("bean:myProcessor").to("file://C:\\path\\to\\targetDirectory");* Now, I need this: - when the i-th polling happens, I want to have a cutom log re

Re: log and set polling time information in exchange header

2018-03-05 Thread Claus Ibsen
Hi Do like the first, dont use pollEnrich. So can you be more clean what you mean by n-th polling. So you set it to poll every 10 seconds. Do you want a log for each of those? Then just use the Log EIP On Mon, Mar 5, 2018 at 11:25 AM, Davide Rossi wrote: > Hi everyone! > I have a route like t

Creating REST API service from yaml

2018-03-05 Thread hrvoje . djurdjevic
Hi Claus, thank you for your suggestion. I tried to utilize it, however I can't figure out how to do it. When I tried to compile test java classes found here: https://github.com/apache/camel/tree/master/tooling/swagger-rest-dsl-generator/src/test/java/org/apache/camel/generator/swagger it compl

Re: Creating REST API service from yaml

2018-03-05 Thread Claus Ibsen
This will be in the upcoming Camel 2.21 release so wait for that release to come out On Mon, Mar 5, 2018 at 4:15 PM, wrote: > Hi Claus, > > thank you for your suggestion. I tried to utilize it, however I can't > figure out how to do it. > When I tried to compile test java classes found here: > h

Re: log and set polling time information in exchange header

2018-03-05 Thread Davide Rossi
Hi, Claus thanks for your quick reply. If I correctly understood what you said, you propose to use something like this from("file://C:\\path\\to\\sourceDirectory?delay=1&directoryMustExist=true").routeId("myRouteId") .log(LoggingLevel.INFO, "it.package.MyLogProcessor", [here the msg])

Re: log and set polling time information in exchange header

2018-03-05 Thread Claus Ibsen
Hi You can use the filter EIP and then filter on when the file batch is complete. You already have a timestamp on the exchange when it was created so you can grab that. And mind this will only trigger when there are files, if there is no files then the route is not executed. You can then turn on

Re: Unit Test Polling Consumer

2018-03-05 Thread Quinn Stevenson
You could setup another HTTP route in your test that returns what you’re after to exercise your test conditions - I’ve done that quite a bit in the past. > On Mar 2, 2018, at 10:45 AM, Karel Bernolet wrote: > > Hello, > > --short version -- > > I am trying to unit test a route calling a polli

Re: log and set polling time information in exchange header

2018-03-05 Thread Claus Ibsen
Hi See a bit here http://camel.apache.org/batch-consumer.html Also there is runLoggingLevel you can turn up|down, however its logging a fixed message but it logs each time the scheduler runs On Mon, Mar 5, 2018 at 5:01 PM, Claus Ibsen wrote: > Hi > > You can use the filter EIP and then filter o

Re: log and set polling time information in exchange header

2018-03-05 Thread Davide Rossi
Hi Claus, ok, I've had a look at what you suggested and maybe the Exchange.BATCH_COMPLETE property could be useful to me. Thank you very much for your help Cheers Davide 2018-03-05 17:06 GMT+01:00 Claus Ibsen : > Hi > > See a bit here > http://camel.apache.org/batch-consumer.html > > Also there

Re: Google Service account for google-drive component

2018-03-05 Thread Guillermo Castro
The Google drive camel component uses OAuth 2.0 for validating API calls. You need a OAuth token. The IAM service account key is something different. You can create OAuth client credentials here: https://console.developers.google.com/apis/credentials On Fri, Mar 2, 2018 at 1:15 PM, Shultz, Dmitry