Package org.apache.camel.processor.aggregate

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


        if (strategyRef != null) {
            aggregationStrategy = routeContext.lookup(strategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            // default to use latest aggregation strategy
            aggregationStrategy = new UseLatestAggregationStrategy();
        }
        if (executorServiceRef != null) {
            executorService = routeContext.lookup(executorServiceRef, ExecutorService.class);
        }
View Full Code Here

        return new RouteBuilder() {
            public void configure() throws Exception {
                getContext().setTracing(true);
               
                from("seda:splitted").
                    aggregate(header("id"), new UseLatestAggregationStrategy()).completionTimeout(1000L).
                    to("mock:foo").
                    to("mock:result");

                from("timer://kickoff?period=9999910000").
                    setHeader("id").constant("foo").setBody().constant("a b c").
View Full Code Here

            @Override
            public void configure() throws Exception {
                context.addComponent("async", new MyAsyncComponent());

                from("direct:start")
                    .split(body(), new UseLatestAggregationStrategy())
                        .to("mock:before")
                        .to("log:before")
                        .process(new Processor() {
                            public void process(Exchange exchange) throws Exception {
                                beforeThreadName = Thread.currentThread().getName();
View Full Code Here

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
                onException(CamelException.class).to("mock:failed");

                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

        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

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("timer:foo")
                    .bean(BigPayload.class)
                    .aggregate(bean(HawtDBBigPayloadTest.class, "number"), new UseLatestAggregationStrategy())
                        .aggregationRepository(repo)
                        .completionSize(2).completionTimeout(5000)
                        .log("Aggregated key ${header.CamelAggregatedCorrelationKey}");
            }
        };
View Full Code Here

        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

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .log("Start ${body}")
                        .split(body().tokenize("@"), new UseLatestAggregationStrategy()).parallelProcessing().streaming()
                        .process(new Processor() {
                            @Override
                            public void process(Exchange exchange) throws Exception {
                                int num = exchange.getIn().getBody(int.class);
                                final long sleep = (long) (num * delay);
 
View Full Code Here

                from(multicastEndpointUri).to("jms:queue:point1", "jms:queue:point2", "jms:queue:point3");
                from("jms:queue:point1").process(new MyProcessor()).to("jms:queue:reply");
                from("jms:queue:point2").process(new MyProcessor()).to("jms:queue:reply");
                from("jms:queue:point3").process(new MyProcessor()).to("jms:queue:reply");
                from("jms:queue:reply").aggregate(header("cheese"), new UseLatestAggregationStrategy()).completionSize(3)
                    .to("mock:reply");
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

Copyright © 2018 www.massapicom. 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.