Examples of UseLatestAggregationStrategy


Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

            public void configure() {
                errorHandler(deadLetterChannel("mock:failed").maximumRedeliveries(0));
                // we don't want the DLC to handle the Exception
                onException(CamelException.class).handled(false);

                from("direct:seqential").split(body().tokenize(","), new UseLatestAggregationStrategy()).to("mock:result");
                from("direct:parallel").split(body().tokenize(","), new MyAggregationStrategy()).parallelProcessing().to("mock:result");
                from("direct:streaming").split(body().tokenize(",")).streaming().to("mock:result");
                from("direct:parallel-streaming").split(body().tokenize(","), new MyAggregationStrategy()).parallelProcessing().streaming().to("mock:result");
                from("direct:exception")
                        .split(body().tokenize(","))
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

        if (strategyRef != null) {
            aggregationStrategy = routeContext.lookup(strategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            // default to use latest aggregation strategy
            aggregationStrategy = new UseLatestAggregationStrategy();
        }

        boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isParallelProcessing());
        ExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Multicast", this, isParallelProcessing());
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

        if (aggregationStrategy == null && strategyRef != null) {
            aggregationStrategy = routeContext.lookup(strategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            // fallback to use latest
            aggregationStrategy = new UseLatestAggregationStrategy();
        }
        return aggregationStrategy;
    }
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

            public void configure() {
                errorHandler(deadLetterChannel("mock:failed").maximumRedeliveries(0));
                // we don't want the DLC to handle the Exception
                onException(CamelException.class).handled(false);

                from("direct:seqential").split(body().tokenize(","), new UseLatestAggregationStrategy()).to("mock:result");
                from("direct:parallel").split(body().tokenize(","), new MyAggregationStrategy()).parallelProcessing().to("mock:result");
                from("direct:streaming").split(body().tokenize(",")).streaming().to("mock:result");
                from("direct:parallel-streaming").split(body().tokenize(","), new MyAggregationStrategy()).parallelProcessing().streaming().to("mock:result");
                from("direct:exception")
                        .split(body().tokenize(","))
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

                // share 8 threads among the 20 routes
                ScheduledExecutorService threadPool = context.getExecutorServiceManager().newScheduledThreadPool(this, "MyThreadPool", 8);
                for (int i = 0; i < NUM_AGGREGATORS; ++i) {
                    from("direct:start" + i)
                        // aggregate timeout after 3th seconds
                        .aggregate(header("id"), new UseLatestAggregationStrategy()).completionTimeout(3000).timeoutCheckerExecutorService(threadPool)
                        .to("mock:result" + i);
                }
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

        if (aggregationStrategy == null && strategyRef != null) {
            aggregationStrategy = routeContext.lookup(strategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            // fallback to use latest
            aggregationStrategy = new UseLatestAggregationStrategy();
        }
        return aggregationStrategy;
    }
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

        if (strategyRef != null) {
            aggregationStrategy = routeContext.lookup(strategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            // default to use latest aggregation strategy
            aggregationStrategy = new UseLatestAggregationStrategy();
        }

        executorService = ExecutorServiceHelper.getConfiguredExecutorService(routeContext, "Multicast", this);
        if (isParallelProcessing() && executorService == null) {
            // we are running in parallel so create a cached thread pool which grows/shrinks automatic
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
                errorHandler(deadLetterChannel("mock:failed").maximumRedeliveries(0).handled(false));

                from("direct:seqential").split(body().tokenize(","), new UseLatestAggregationStrategy()).to("mock:result");

                from("direct:parallel").split(body().tokenize(","), new MyAggregationStrategy()).parallelProcessing().to("mock:result");

                from("direct:streaming").split(body().tokenize(",")).streaming().to("mock:result");
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

        if (aggregationStrategy == null && strategyRef != null) {
            aggregationStrategy = routeContext.lookup(strategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            // fallback to use latest
            aggregationStrategy = new UseLatestAggregationStrategy();
        }
        return aggregationStrategy;
    }
View Full Code Here

Examples of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

        if (strategyRef != null) {
            aggregationStrategy = routeContext.lookup(strategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            // default to use latest aggregation strategy
            aggregationStrategy = new UseLatestAggregationStrategy();
        }

        executorService = ExecutorServiceHelper.getConfiguredExecutorService(routeContext, "Multicast", this);
        if (isParallelProcessing() && executorService == null) {
            // we are running in parallel so create a cached thread pool which grows/shrinks automatic
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.