use of org.apache.camel.impl.EmptyConsumerCache in project camel by apache.
the class PollEnricher method doStart.
protected void doStart() throws Exception {
if (consumerCache == null) {
// create consumer cache if we use dynamic expressions for computing the endpoints to poll
if (cacheSize < 0) {
consumerCache = new EmptyConsumerCache(this, camelContext);
LOG.debug("PollEnrich {} is not using ConsumerCache", this);
} else if (cacheSize == 0) {
consumerCache = new ConsumerCache(this, camelContext);
LOG.debug("PollEnrich {} using ConsumerCache with default cache size", this);
} else {
consumerCache = new ConsumerCache(this, camelContext, cacheSize);
LOG.debug("PollEnrich {} using ConsumerCache with cacheSize={}", this, cacheSize);
}
}
ServiceHelper.startServices(consumerCache, aggregationStrategy);
}
Aggregations