This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 5187ffe CAMEL-16458: PollEnricher EIP - small optimization 5187ffe is described below commit 5187ffe1c9b0836452f59b57bcfe1d034750b881 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sat Apr 10 13:40:53 2021 +0200 CAMEL-16458: PollEnricher EIP - small optimization --- .../org/apache/camel/processor/PollEnricher.java | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/PollEnricher.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/PollEnricher.java index c9125d1..ccd313f 100644 --- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/PollEnricher.java +++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/PollEnricher.java @@ -194,18 +194,6 @@ public class PollEnricher extends AsyncProcessorSupport implements IdAware, Rout this.ignoreInvalidEndpoint = ignoreInvalidEndpoint; } - @Override - protected void doInit() throws Exception { - if (destination != null) { - Endpoint endpoint = getExistingEndpoint(camelContext, destination); - if (endpoint == null) { - endpoint = resolveEndpoint(camelContext, destination, cacheSize < 0); - } - } else if (expression != null) { - expression.init(camelContext); - } - } - /** * Enriches the input data (<code>exchange</code>) by first obtaining additional data from an endpoint represented * by an endpoint <code>producer</code> and second by aggregating input data and additional data. Aggregation of @@ -449,6 +437,16 @@ public class PollEnricher extends AsyncProcessorSupport implements IdAware, Rout if (aggregationStrategy instanceof CamelContextAware) { ((CamelContextAware) aggregationStrategy).setCamelContext(camelContext); } + ServiceHelper.buildService(consumerCache, aggregationStrategy); + } + + @Override + protected void doInit() throws Exception { + if (expression != null) { + expression.init(camelContext); + } + + ServiceHelper.initService(consumerCache, aggregationStrategy); } @Override