Re: file moveFailed not working for me.

2019-05-01 Thread Trilok Agarwal
I think you should set fault to true when there is an exception.

On Wed, May 1, 2019, 7:12 PM Hart, James W.  wrote:

> I have a camel route that polls for files, and processes the files, and
> have set "move" and "moveFailed" so that on success or failure the files
> should move to their respective directories.  But no matter what all of my
> files go to the move directory, even though in my route I process a bad
> file and an exception is thrown during the route.
>
> Either way when a good file or a bad file is processed, both are moved to
> the move directory.
>
> Here is the string for my from on my route:
>
> file:///dataupload/boximetadata/csv?charset=iso-8859-1=.*.csv=0=1=..%5C..%5Cboximetadataarchive%5Ccsv=.error
>
> The exception is this from beanio:
> org.beanio.InvalidRecordException: Invalid 'rowdata' record at
> line 2
>
> Am I misunderstanding this, or do I need to do different exception
> handling?  Does anybody have any ideas on why all files end up in the move
> directory?
>
>


Re: [DISCUSS] - Apache Camel 3 - A new tagline

2019-02-19 Thread Trilok Agarwal
Could be anything which express its best feature, like,
"Apache Camel 3 - Simplify Integration"

--
Trilok

On Tue, Feb 19, 2019, 11:14 PM Antonin Stefanutti 
wrote:

>
>
> > On 19 Feb 2019, at 18:26, Andrea Cosentino 
> wrote:
> >
> > I'm fine with that tagline, but maybe we need to maintain something from
> the old one too? What do you think?
>
> However I’m all in a world of containers, I tend to agree. One a the key
> value of Camel, besides the awesome DSL and connectors, is its target
> runtimes versatility. So Maybe something like:
>
> "Apache Camel 3: Agile integration framework..."
>
> As it captures that ability to run everywhere and may ring some other
> bells.
>
> --
> Antonin
>
> > --
> > Andrea Cosentino
> > --
> > Apache Camel PMC Chair
> > Apache Karaf Committer
> > Apache Servicemix PMC Member
> > Email: ancosen1...@yahoo.com
> > Twitter: @oscerd2
> > Github: oscerd
> >
> >
> >
> >
> >
> >
> > On Tuesday, February 19, 2019, 4:52:06 PM GMT+1, Claus Ibsen <
> claus.ib...@gmail.com> wrote:
> >
> >
> >
> >
> >
> > Hi
> >
> > As part of Apache Camel 3, we are working on a new modern website
> > (yeah its long overdue, but work are in progress).
> >
> > As part of that, we should get a new front-page with a new short
> > summary what Apache Camel is (eg a tagline).
> >
> > It would be good to get some ideas rolling what such a tagline could
> > be and for users of Camel to come up with suggestions.
> >
> > As Apache Camel has been around for so long, and that it covers so
> > many different use-cases, then its maybe harder to come up with a
> > single tag-line that spans all use-cases.
> >
> > However with the new modern world of containers I came up with:
> >
> > * Apache Camel 3 - A full-stack integration framework for building
> > cloud-native micro integrations
> >
> >
> >
> > --
> > Claus Ibsen
> > -
> > http://davsclaus.com @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
>
>


Re: Camel lock gets acquired on files but not picked sometime

2018-08-06 Thread Trilok Agarwal
You can make the processes mutually exclusive through setting up a
scheduler by giving a cron expression so that your FTP or File component
would not read files when they are being written, just in case
if processing of your file not real time and copying of file via VB script
is also scheduled.

Otherwise readLock=changed would help, try it out-
>From camel documentation-

*changed* is using file length/modification timestamp to detect whether the
file is currently being copied or not. Will at least use 1 sec. to
determine this, so this option cannot consume files as fast as the others,
but can be more reliable as the JDK IO API cannot always determine whether
a file is currently being used by another process. The option
*readLockCheckInterval* can be used to set the check frequency. This option
is *only* avail for the FTP  component
from *Camel 2.8* onward. Note: from *Camel 2.10.1* onward the FTP
 option *fastExistsCheck* can be enabled
to speedup this *readLock* strategy, if the FTP server support the LIST
operation with a full file name (some servers may not)

On Mon, Aug 6, 2018 at 7:26 PM, Claus Ibsen  wrote:

> Also you can use "done" files, eg in the VB script you write a 2nd
> empty file with a special name, that tells Camel that the other file
> is done being copied and ready.
> There is some options on Camel file endpoint you can configure for that
> also.
>
> On Mon, Aug 6, 2018 at 3:54 PM, Claus Ibsen  wrote:
> > Hi
> >
> > You can configure Camel to only pickup files with a certain file
> > pattern, or to exclude names with temporary names, etc.
> > There is a number of different filter options, see its doc.
> >
> > On Mon, Aug 6, 2018 at 3:52 PM, Hemant Pekhale 
> wrote:
> >> Hi Claus,
> >>
> >> Thanks for the reply.
> >>
> >> Yes, I am able to modify the script. But if we do copy the file with
> >> temporary name and then rename, I doubt that there may be lock acquired
> on
> >> temporary file name already. because my route has no waiting parameter.
> So
> >> I think it might not be helpful for our case. Please correct me if I am
> >> wrong.
> >>
> >> Regarding the file lock strategies, I think  readLock think
> >> readLockCheckInterval think can be tried. Do you have any other
> suggestion?
> >>
> >> FYI : Whatever I can try I need to try on Production server so just
> wanted
> >> to tackle this with minimum and required trials.
> >>
> >> Thanks!
> >>
> >>
> >> On Mon, Aug 6, 2018 at 7:10 PM, Claus Ibsen 
> wrote:
> >>
> >>> Hi
> >>>
> >>> Are you able to modify the VB script so it copies the file using a
> >>> temporary name and then rename the file when the copy is done.
> >>>
> >>> It sounds a bit like the problem is that the VB script is currently
> >>> still copying the file, while Camel gets a lock on the file, and
> >>> attempt to process it.
> >>> File locks is not as easy and it depends a bit what file system, OS,
> >>> and how big the files are and other things.
> >>>
> >>> A good strategy is to copy the files using temporary names or in
> >>> another folder, and then do a file rename when the copy is over, that
> >>> latter then is an atomic file operation which should not cause file
> >>> locking issues.
> >>>
> >>> You can also try to use some of the other Camel file lock strategies
> >>> instead of marker files.
> >>> You can see more in the file documentation about these.
> >>>
> >>>
> >>> On Mon, Aug 6, 2018 at 3:19 PM, Hemant Pekhale <
> hemant.pekh...@gmail.com>
> >>> wrote:
> >>> > Hi All,
> >>> >
> >>> > I have a route which picks files from a folder and do some
> processing on
> >>> it
> >>> > and store it in other folder. I have used parameter "delete=true" for
> >>> > deleting file from source folder.
> >>> >
> >>> > Sometime it happens that files are stuck in the source folder and
> camel
> >>> > lock files are also created for all the files but files are neither
> >>> process
> >>> > nor gets deleted.
> >>> >
> >>> > There is a VB script which copied files in the source folder. When I
> >>> > manually copied the files in the source folder then it never gives
> issue
> >>> > but when the files are copied from VB script then only issue occurs.
> Also
> >>> > the issue does not occur for the first file but it occurs randomly
> after
> >>> > processing number of files.
> >>> >
> >>> > This happens on server. I tried to reproduce this issue locally but
> no
> >>> luck.
> >>> >
> >>> > Does anybody have idea about it?
> >>> >
> >>> > Thanks!
> >>>
> >>>
> >>>
> >>> --
> >>> Claus Ibsen
> >>> -
> >>> http://davsclaus.com @davsclaus
> >>> Camel in Action 2: https://www.manning.com/ibsen2
> >>>
> >
> >
> >
> > --
> > Claus Ibsen
> > -
> > http://davsclaus.com @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: extracting data from large xml of SOAP services in processor class

2017-05-29 Thread Trilok Agarwal
You can use xquery expression to get the desired element.

On May 30, 2017 12:08 AM, "anjanaintergration" <2340pa...@gmail.com> wrote:

>
> Hi ,
>
> We have a SOAP service that sends huge data 4 gb. We need to route this
> response to another SOAP service. However there is an element in SOAP:BODY
> which we need to extract and set as SOAP header in outgoing service.
>
> I understand converting to JAXB is not optimal since huge data converting
> to
> java object is not efficient.
> Please suggest alternative possible in apache camel  in processor class
> called from routebuilder to extract SOAP :BODY data from large xml
> response.
>
> Thanks,
> Anjana
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/extracting-data-from-large-xml-of-SOAP-services-in-
> processor-class-tp5801312.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>