I am new to Apache Camel. So please excuse the novice question. I am building a testing framework to see how much a single router can put message into the queue.
I have a basic camel-context.xml where the router is injected. <bean id="myRouter" class="com.foofoo.camel.jms.MyProducer"> </bean> <camelContext xmlns="http://camel.apache.org/schema/spring"> <routeBuilder ref="myRouter"/> </camelContext> And in the router, I am using the Class Component URI combination. (based on this doc: https://cwiki.apache.org/confluence/display/CAMEL/Components ) @Component public class MyProducer extends RouteBuilder{ private String endpoint = "class:com.foofoo.camel.jms.SimulateProducer?method=getMessage"; @Override public void configure() throws Exception { this.from(endpoint). process(new Processor() { public void process(Exchange exchange) throws Exception { System.out.println("We just downloaded: " + exchange.getIn().getHeader("CamelFileName")); } }).to("jms:queue:incomingOrders"); } public class SimulateProducer { private final static Logger LOGGER = Logger.getLogger(SimulateProducer.class .getName()); public String getMessage() { StringBuilder msg = new StringBuilder(); Date currentTime = new Date(System.currentTimeMillis()); msg.append(currentTime.toString()); LOGGER.debug(msg.toString()); return msg.toString(); } } However, I notice that just like when I used an endpoint like http:, it was doing the http get quite frequently. I think I saw how I can control the pollInterval for HttpComponents, but how do I control it on a POJO Component?