camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel 2.15.3: multicast with aggregationStrategy() not working ...
Date Fri, 23 Oct 2015 05:17:44 GMT
Exchange.AGGREGATION_COMPLETE_CURRENT_GROUP is for the aggreagator
eip, not muilticast.

On Thu, Oct 22, 2015 at 8:15 PM, SteveR <srichardson@vonage.com> wrote:
> I'm using Camel 2.15.3 with a route that reads from *netty4:udp* and
> multicasts to two SEDA queues and uses *aggregationStrategy()* to choose the
> correct response to send back to the client as the UDP reply.
>
> I can see the correct reply coming into the aggregate() method, but setting
> the *Exchange.AGGREGATION_COMPLETE_CURRENT_GROUP* property on the returned
> exchange does not stop the aggregation.  Am I doing something wrong, or do
> we know of any bugs in the area?
>
>
> Thanks, SteveR
>
>     @Override
>     public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
>
>         String newBody = newExchange.getIn().getBody(String.class);
>         if(newBody.contains(CQMS_ACK_SUBSTRING)) {
>
> newExchange.getOut().setBody(newExchange.getIn().getBody(String.class));
>
> newExchange.getOut().setHeaders(newExchange.getIn().getHeaders());
>
> newExchange.setProperty(Exchange.AGGREGATION_COMPLETE_CURRENT_GROUP, true);
>             return newExchange;
>         }
>         return newExchange;
>     }
>
>
>         from(fromURI)
>                 .setExchangePattern(ExchangePattern.InOut)
>                 .routeId(sourceRouteId)
>                 .setProperty(Exchange.CHARSET_NAME,
> ExpressionBuilder.constantExpression(charsetName))
>                 .threads(threadPoolSize /*poolSize*/, threadPoolSize * 2 /*maxPoolSize*/)
>                         .threadName("threads_" + sourceRouteId)
>                 .callerRunsWhenRejected(true); // Hard-coded since we always want this
> behavior!
>                         .multicast()
>                         .parallelProcessing()
>                         .aggregationStrategy(new CqmsAckBackAggregationStrategy(ackBackRequired,
> charsetName))
>                         .to(firstToURIs);
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-2-15-3-multicast-with-aggregationStrategy-not-working-tp5772978.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Mime
View raw message