camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henryk Konsek <hekon...@gmail.com>
Subject Re: pollInterval for custom Component
Date Thu, 09 Aug 2012 08:52:59 GMT
Hi Sean,

> I think I saw how I can control the pollInterval for HttpComponents,
> but how do I control it on a POJO Component?

You can create custom Pooling consumer by extending the
ScheduledPollConsumer [1] class. In such case you can override poll()
method in your custom consumer to provide the batch of messages that
should be periodically passed to the route. You can configure at the
endpoint configuration level, how often ScheduledPollConsumer-based
class should fetch the data.

> I am building a testing framework to see how much a single router can
> put message into the queue.

Actually I would prefer to implement your scenario by creating
JMeter[2] load test sending the messages to the endpoint exposed at
the route. I would not use custom component for that purpose.

Regards.

[1] http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/ScheduledPollConsumer.html
[2] http://jmeter.apache.org

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com

Mime
View raw message