Search in sources :

Example 1 with EmptyConsumerCache

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);
}
Also used : EmptyConsumerCache(org.apache.camel.impl.EmptyConsumerCache) EmptyConsumerCache(org.apache.camel.impl.EmptyConsumerCache) ConsumerCache(org.apache.camel.impl.ConsumerCache)

Aggregations

ConsumerCache (org.apache.camel.impl.ConsumerCache)1 EmptyConsumerCache (org.apache.camel.impl.EmptyConsumerCache)1