Take a look at *CAMEL-3491<https://issues.apache.org/jira/browse/CAMEL-3491> - it is proposed DSL enhancement that I was able to come up with; patch and examples are in jira.*
Thanks, Pavel On Thu, Dec 23, 2010 at 4:55 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > On Tue, Dec 21, 2010 at 7:29 PM, Pavel <pag...@gmail.com> wrote: > > Cool; I guess then for this topic I'm missing a review from core > committers > > (Gert, are you around?), so that I could address feedback. And propose > docs > > then. > > > > IMO the next logical and handy DSL enhancement would be introduction of > > "every(period)", as alias for > > "from(timer:someGeneratedName?period=equivalentInMs)" > > > > In Camel 3.x we will work on adding some form of schedule DSL to > camel-core so you can kinda define a route to trigger every X using > some sort of DSL. And support CRON as well. Then you can plugin a CRON > provider such as Quartz, or Spring 3.x which may have a CRON parser as > well. > > There is a ticket for this in JIRA. > > But getting a head start in the scala DSL would be great, then we may > get settled on a nice DSL for that, we can port into camel-core when > its time for that. > > > Thanks, > > Pavel > > > > On Mon, Dec 20, 2010 at 8:20 AM, Claus Ibsen <claus.ib...@gmail.com> > wrote: > > > >> Hi Pavel > >> > >> Great work. We would love help and contributions with the Scala DSL. > >> I think we should ty to unify how you specify period / time as you > suggest. > >> > >> And I dont mind the trade off, so please continue your work. > >> I am sure you will even be able to find other spots in the Scala DSL > >> which could be improved. > >> > >> > >> > >> On Fri, Dec 17, 2010 at 10:55 PM, Pavel <pag...@gmail.com> wrote: > >> > Folks, > >> > > >> > I have an idea for period DSL enhancement in camel-scala that I want > to > >> get > >> > your feedback on. > >> > And a proposed implementation in > >> > https://issues.apache.org/jira/browse/CAMEL-3439 > >> > > >> > Basically, there are 3 goals > >> > * Support more time units - milliseconds to weeks > >> > * Allow mixed units in period spec: 3 hours 20 minutes 30 seconds > >> > * Internally remove/minimize duplication, so that units and relevant > >> > transformations are defined in one place. Current codebase has these > in > >> > - Period > >> > - RichInt > >> > - Frequency > >> > - SDelayDefinition (not sure if DSL uses these methods) > >> > - SThrottleDefinition (not sure if DSL uses these methods) > >> > > >> > My implementation has a price - it requires DSL to always use period > spec > >> in > >> > parentheses, so that scala compiler knows exactly where its definition > >> > starts and ends. > >> > Practically, it means no changes to "delay", and extra "()" for > >> "throttle", > >> > e.g. > >> > * throttle (3 per (1 second)) > >> > * throttle (3 per (1 minute 30 seconds)) > >> > > >> > So, for you scala DSL users, does it sound like a useful enhancement > and > >> > reasonable tradeoff? > >> > > >> > Thanks, > >> > Pavel > >> > > >> > >> > >> > >> -- > >> Claus Ibsen > >> ----------------- > >> FuseSource > >> Email: cib...@fusesource.com > >> Web: http://fusesource.com > >> Twitter: davsclaus > >> Blog: http://davsclaus.blogspot.com/ > >> Author of Camel in Action: http://www.manning.com/ibsen/ > >> > > > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cib...@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ >