So I will try to use a delayer between the queue and the reporting service :

           <camel:from ref="queueReportingEndpoint" />
           <camel:transacted ref="PROPAGATION_REQUIRED" />
           <camel:delay><constant>3600000</constant></camel:delay> --> to
delay 1H

BTW : It should be interesting to link (like in a job) the starting/stopping
of a Camel route to a scheduler and to offer the possibity to link routes
together depending if the job succeed (= route) or fail. With such feature,
we can use also Camel as Spring Barch to handle jobs !!!!

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

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


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.
>
> 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
>>
>>
>

Reply via email to