[
https://issues.apache.org/jira/browse/CAMEL-16472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17320251#comment-17320251
]
Claus Ibsen commented on CAMEL-16472:
-------------------------------------
Using the endpoint with to is much harder as we cannot control 100% how to
continue routing at the right thread when kamelet:sink is called in the route
template.
Otherwise we would need to do some "hacks" when building the route, and detect
that in ToReifier that the endpoint is a kamelet and do some kind of
transformation to a pseudo Kamelet EIP.
> 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)