An exchange has a timestamp when it was created as a property you can read

On Fri, Jan 13, 2017 at 11:44 AM, sa_james <sa_remin...@hotmail.com> wrote:
> Why does this one match?
>
>
>
>    this.context.addRoutes(new RouteBuilder() {
>             @Override
>             public void configure() throws Exception {
>                 onCompletion().log("${body} completed");
>                 from("direct:S")
>                 .aggregate(new
> GroupedExchangeAggregationStrategy()).constant(Boolean.TRUE).completionSize(2).completionTimeout(2000)
>                 .split(body())
>                 .aggregate(new
> GroupedExchangeAggregationStrategy()).constant(Boolean.TRUE).completionSize(2).completionTimeout(2000)
>
>                 .to("log:icu")
>
>                 .to("mock:me").routeId("TEST");
>             }
>         });
>         MockEndpoint mock = getMockEndpoint("mock:me");
>         mock.expectedMessageCount(2);
>
>         NotifyBuilder notify = new
> NotifyBuilder(this.context).fromRoute("TEST").whenDone(16).create();
>         this.startCamelContext();
>
>         template.sendBody("direct:S", "A");
>         template.sendBody("direct:S", "B");
>         template.sendBody("direct:S", "C");
>         template.sendBody("direct:S", "D");
>
>         boolean matches = notify.matches(20, TimeUnit.HOURS);
>         assertTrue(matches);
>
> What is the best way to time how long it took for "mock:me" to receive its 2
> messages?
>
>      NotifyBuilder notify = new
> NotifyBuilder(this.context).wereSentTo("log:icu").whenCompleted(2).create();
>      NotifyBuilder notify = new
> NotifyBuilder(this.context).wereSentTo("mock:me").whenCompleted(2).create();
>
>
>
>
> -----
> Guile Newbie
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Aggregate-completion-notifybuilder-tp5792441p5792494.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to