camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <>
Subject [jira] Resolved: (CAMEL-1371) Resequencer - stream - add predicate to allow me to supply my own gap detection
Date Mon, 21 Jun 2010 03:24:53 GMT


Willem Jiang resolved CAMEL-1371.

    Fix Version/s: 2.4.0
                       (was: Future)
       Resolution: Fixed

> Resequencer - stream - add predicate to allow me to supply my own gap detection
> -------------------------------------------------------------------------------
>                 Key: CAMEL-1371
>                 URL:
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 2.4.0
> The resequencer stream based uses Long for gap detection as Camel then knows if there
is a gap if eg a number in between is missing.
> However sometimes you can not convert/compute a Long that is in sequence based on your
> Imagine you consume files from a folder and want them to be resequenced so you process
them in the correct order.
> The file names have this pattern: YYYYMMDD-DNNN.txt. Where YYYYMMDD is the date pattern
and D is a fixed string and NNN is a numeric value for that particular day.
> Eg: 20090223-D001.txt, 20090223-D002.txt ...
> So if we could add a predicate to the resequencer where I could impl. the gap detection,
then I would be able to do:
> {code}
> from("file://inbox").resequence(header("CamelFileName")).gapPredicate(new MyGapPredicate()).timeout(60000).to("bean:processFileInSequence");
> {code}
> Where *gapPredicate* is the new feature. Think about a better name for it, than gap predicate!!

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message