camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: ibatis component consumer.onConsume ignored when using timer component
Date Tue, 15 Jun 2010 08:22:26 GMT
On Tue, Jun 15, 2010 at 10:21 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> On Mon, Jun 14, 2010 at 4:01 PM, Cory Bestgen <cory@bestgen.net> wrote:
>> Hello,
>>
>> This is my first go at camel but I haven't been able to get the
>> "consumer.onConsume" to work with a timer.
>> Any ideas?
>>
>> Using camel 2.3 and spring
>>
>> This does not cause the "consumeRecord" statement to fire -
>> from("timer://pollTimer?fixedRate=true&period=100000&delay=15000")
>>
>> .to("ibatis:pollTable?consumer.onConsume=consumeRecord&statementType=QueryForList")
>>    .to("ibatis:insertRecord?statementType=Insert");
>>
>> This does -
>> from("ibatis:pollTable?consumer.onConsume=consumeRecord&statementType=QueryForList")
>>    .to("ibatis:insertRecord?statementType=Insert");
>>
>
> consumer.XXX is only for the consumer, eg when using from(xxx)
> When you do a to(zzz) then you are a producer.
>

And you can set a delay / initialDelay options on the from endpoint so
you dont need that timer.

>
>>
>> Thanks,
>> Cory
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message