Examples of BodyInAggregatingStrategy


Examples of org.apache.camel.processor.BodyInAggregatingStrategy

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+C+END");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
        Predicate complete = body().contains("END");

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionPredicate(complete);
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedBodiesReceived("A+B+END");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
        Predicate complete = body().contains("END");

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionPredicate(complete);
        ap.setCloseCorrelationKeyOnCompletion(1000);
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

        mock.expectedBodiesReceived("A+B", "C+D+E");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "consumer");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionSize(100);
        ap.setCompletionFromBatchConsumer(true);
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

                send.process(exchange);
            }
        };
               
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setEagerCheckCompletion(true);
        ap.setCompletionPredicate(body().isEqualTo("END"));
        if (handler != null) {
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

        mock.expectedBodiesReceived("B+END", "A+END");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "forceCompletion");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionSize(10);
        ap.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

                from("file://target/concurrent?sortBy=file:name")
                    .setHeader("id", simple("${file:onlyname.noext}"))
                    .threads(10)
                    .beanRef("business")
                    .log("Country is ${in.header.country}")
                    .aggregate(header("country"), new BodyInAggregatingStrategy())
                        .completionTimeout(2000L)
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

            @Override
            public void configure() throws Exception {
                from("file://target/concurrent?sortBy=file:name")
                    .setHeader("id", simple("${file:onlyname.noext}"))
                    .beanRef("business")
                    .aggregate(header("country"), new BodyInAggregatingStrategy())
                        .completionTimeout(2000L)
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .aggregate(header("id"), new BodyInAggregatingStrategy()).completionSize(40)
                        .to("mock:result");
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

            public void configure() throws Exception {
                from("file://target/concurrent?sortBy=file:name")
                    .setHeader("id", simple("${file:onlyname.noext}"))
                    .threads(10)
                    .beanRef("business")
                    .aggregate(header("country"), new BodyInAggregatingStrategy())
                        .completionFromBatchConsumer()
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

            @Override
            public void configure() throws Exception {
                from("file://target/concurrent?sortBy=file:name")
                    .setHeader("id", simple("${file:onlyname.noext}"))
                    .beanRef("business")
                    .aggregate(header("country"), new BodyInAggregatingStrategy())
                        .completionFromBatchConsumer()
                        .to("mock:result");
            }
        });
        context.start();
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.