camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4564) Make dynamicRouter conformant to the pattern
Date Tue, 22 Oct 2013 08:37:42 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13801609#comment-13801609
] 

Claus Ibsen commented on CAMEL-4564:
------------------------------------

What do you mean with "return a result". 

If you use recipient list to send to 1 endpoint (you can send to 2+ if you want). The output
from routing to that endpoint is used as output from the recipient list - it would be the
same as you are using .to("someEndpointUriHere"). And if the MEP is InOnly or InOut then it
handles that as well.

If you have 2+ endpoints you can use the aggregation strategy to merge into a single result.
It uses by default the org.apache.camel.processor.aggregate.UseLatestAggregationStrategy

> Make dynamicRouter conformant to the pattern
> --------------------------------------------
>
>                 Key: CAMEL-4564
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4564
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.8.1
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: Future
>
>
> Currently the dynamic router loops over evaluating the expression and sending to the
endpoint till the expression returns null.
> This is not really what the EIP dynamic router says. The pattern says "the Dynamic Router
evaluates all rules and routes the message to the recipient whose rules are fulfilled".
> So for me this sounds like we should only send to one endpoint.
> So my proposal is to change the dynamicRouter so it simply evaluates the expression as
a uri and routes to this destination if it is not null else it simply passes the exchange
to the next processor.
> As some people may use the loop functionality I propose to add a new DSL element that
mimics the current behaviour. A first proposal for a name is .loopTo(Expression) . So this
means loop and send to the endpoint specified by the expression. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message