[
https://issues.apache.org/jira/browse/CAMEL-16472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17320248#comment-17320248
]
Claus Ibsen commented on CAMEL-16472:
-------------------------------------
Adding a new Kamelet EIP seems likely as the better solution. It allows the
control and flexibility to have multiple exit points from a kamelet
(kamelet:sink) that can continue route in the callee route, eg the example
above works with
{code}
routeTemplate("my-aggregate")
.templateParameter("count")
.from("kamelet:source")
.aggregate(constant(true))
.completionSize("{{count}}")
.aggregationStrategy(AggregationStrategies.string(","))
.to("log:aggregate")
.to("kamelet:sink")
.end();
from("direct:start")
.kamelet("my-aggregate?count=5")
.to("log:info")
.to("mock:result");
{code}
> kamelet: aggregation kamelet not wired properly
> -----------------------------------------------
>
> Key: CAMEL-16472
> URL: https://issues.apache.org/jira/browse/CAMEL-16472
> Project: Camel
> Issue Type: Bug
> Components: camel-kamelet, camel-yaml-dsl
> Affects Versions: 3.9.0
> Reporter: Luca Burgazzoli
> Priority: Major
> Fix For: 3.10.0
>
>
> Assuming we have a kamelet named _aggregate_ that define an aggregation step,
> like:
> {code:yaml}
> - from:
> uri: "kamelet:source"
> steps:
> - aggregate:
> correlation-expression:
> simple: "${header.Kind}"
> strategy-ref: "myAggregatorStrategy"
> completion-size: "{{count}}"
> steps:
> - to: "log:aggregate"
> - to: "kamelet:sink"
> {code}
> And a route using such kameelt:
> {code:yaml}
> - from:
> uri: "timer:tick"
> steps:
> - set-header:
> name: "Kind"
> constant: "simple"
> - set-body:
> simple: "${exchangeProperty.CamelTimerCounter}"
> - to: "kamelet:aggregate?count=5"
> - to: "log:info"
> {code:}
> When this code is executed, the_ log:info_ endpoint will log each individual
> exchange produced by the timer but not the aggregated one which is instead
> logged by the _log:aggregate_ endpoint (part of the _aggregate_ kamelet).
> This happen because the route engine does not wire the _kamelet:sink_
> endpoint of the _aggregate_ kamemelt but the route output.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)