endpoint = routeContext.resolveEndpoint(resourceUri);
} else {
endpoint = routeContext.resolveEndpoint(null, resourceRef);
}
PollEnricher enricher;
if (timeout != null) {
enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout, pollMultiple);
} else {
// if no timeout then we should block, and there use a negative timeout
enricher = new PollEnricher(null, endpoint.createPollingConsumer(), -1, pollMultiple);
}
if (aggregationStrategyRef != null) {
aggregationStrategy = routeContext.mandatoryLookup(aggregationStrategyRef, AggregationStrategy.class);
}
if (aggregationStrategy == null) {
enricher.setDefaultAggregationStrategy();
} else {
enricher.setAggregationStrategy(aggregationStrategy);
}
return enricher;
}