camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: (FTP) DefaultScheduledPollConsumer: Converts a polling consumer into an event-driven consumer instance.
Date Mon, 16 Jan 2012 09:03:42 GMT
On Mon, Jan 16, 2012 at 9:21 AM, Raul <> wrote:
> I suppose that the event will be produced when the FTP Route receives every
> file.
> When I read that I can convert a polling consumer into a event-driven
> consumer with DefaultScheduledPollConsumer I thought it's that I need. But I
> didn't found any example.
> I am begining to walk with Camel. I thought that this class,
> DefaultScheduledPollConsumer, converts automatically the consumer. But
> perhaps, it isn't automatically and I have to program the events. Is it?

A scheduled poll consumer, is .. well scheduled. That means you
configured the consumer to trigger every X period.
By default that is every 500 milli seconds.

This kind of consumer is needed if you are not truly event based, but
may want to "simulate" as being event based.
An example is file based consumers. As they run periodically and scan
for new files. This is needed as the file API
does not have any event (yet) being triggered when new files / files
changes etc. Although JDK7 now have API for this,
but Camel is supporting JDK6+.

If you are truly event based, then just use the plain consumer, such
as DefaultConsumer.

> Thank you.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message