Claus,

You mean to create a route like this :

A) Option 1

   <camel:from
uri="quartz://x3sReporting/clientError?cron=0+0/5+9-18+?+*+MON-FRI"/>
      <camel:to ref="queueReportingEndpoint" />
      <camel:pollEnrich uri="????"/>
      <camel:marshal ref="csvAuditBindyDataFormat" />
      <camel:to ref="fileReportingEndpoint" />

Question :
- In my case, no enrichement is planned so which information must be put to
replace ????
- How can we define the delay in spring DSL ?

OR

B) Option 2

<from ref="queueReportingEndpoint" />
      <camel:pollEnrich uri="????"/>

Remark : In spring DSL, pollEnrich only accepts an uri but not a ref !!

Is this approach better than using delayer EIP ?


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Fri, Aug 21, 2009 at 10:57 AM, Claus Ibsen <[email protected]> wrote:

> On Fri, Aug 21, 2009 at 10:50 AM, Willem Jiang<[email protected]>
> wrote:
> > Hi Charles,
> >
> > I don't think the route rule will work for you.
> > Please remember if your rule has the
> > <camel:to ref="queueReportingEndpoint" />
> > will send the message body to your report queue, not receive the message
> for
> > the report queue.
> >
> > Maybe you need find other way to trigge the jms consumer.
> >
>
> .pollEnrich can consume for a endpoint.
>
>
> > Willem
> >
> > Charles Moulliard wrote:
> >>
> >> Hi,
> >>
> >> I have configured my route to use quartz as a job scheduler to read the
> >> content of my queue every 5 minutes but unfortunately, the body type
> send
> >> to
> >> marshal endpoint is of type "JobDetail" and not "List" as expected.
> >>
> >> 09:30:02,545 | INFO  | heduler_Worker-1 | x3s
> >>  |
> >> rg.apache.camel.processor.Logger   88 | Exchange[
> >> , BodyType:org.quartz.JobDetail
> >> , Body:JobDetail
> >>
> >>
> 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI':
> >> jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false
> >> isVolatile: false isDurable: false requestsRecovers: false
> >> , CaughtExceptionType:java.lang.ClassCastException,
> >> CaughtExceptionMessage:org.quartz.JobDetail,
> >> StackTrace:java.lang.ClassCastException: org.quartz.JobDetail
> >>    at
> >>
> >>
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.marshal(BindyCsvDataFormat.java:60)
> >>    at
> >>
> >>
> org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:52)
> >>
> >> Is my configuration wrong ?
> >>
> >>        <camel:route errorHandlerRef="txErrorHandler">
> >>            <camel:from
> >> uri="quartz://x3sReporting/clientError?cron=0+0/5+9-18+?+*+MON-FRI"/>
> >>            <camel:to ref="queueReportingEndpoint" />
> >>            <camel:transacted ref="PROPAGATION_REQUIRED" />
> >>            <camel:doTry>
> >>                <camel:filter>
> >>                    <camel:simple>body is java.util.List</camel:simple>
> >>                </camel:filter>
> >>                <camel:marshal ref="csvAuditBindyDataFormat" />
> >>                <camel:to ref="fileReportingEndpoint" />
> >>                <camel:doCatch>
> >>
>  <camel:exception>java.lang.Exception</camel:exception>
> >>                    <camel:to
> >>
> >>
> uri="log:com.xpectis.x3s?level=INFO&amp;multiline=true&amp;showException=true&amp;showCaughtException=true&amp;showStackTrace=true"
> >> />
> >>                    <camel:rollback />
> >>                </camel:doCatch>
> >>            </camel:doTry>
> >>        </camel:route>
> >>
> >> Regards,
> >>
> >> Charles Moulliard
> >> Senior Enterprise Architect
> >> Apache Camel Committer
> >>
> >> *****************************
> >> blog : http://cmoulliard.blogspot.com
> >>
> >
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Reply via email to