Hi Claus, tx for the response.
I tried the claim check EIP like ..
...
<log message="outer body before split loop: ${body}" />
<split streaming="true">
<jsonpath>$.consumer[*]</jsonpath>
<setBody><constant>XXX</constant></setBody>
<log message="inner body: ${body}" />
<claimCheck operation="Set" key="AAA" filter="body" />
</split>
<log message="outer body before claim check: ${body}" />
<claimCheck operation="Get" key="AAA" filter="body" />
<log message="outer body after claim check: ${body}" />
...
but it doesn't seem to work.
After the split loop I'm always getting the same body as before the split loop.
Do I something wrong here?
Best
- Gerald
> Claus Ibsen <[email protected]> hat am 9. Januar 2020 um 13:15
> geschrieben:
>
>
> Hi
>
> You can use claim check EIP or use a custom aggregation strategy with
> your splitter to tell Camel what data to merge as the result of the
> splitter.
>
> On Thu, Jan 9, 2020 at 1:01 PM Gerald Kallas <[email protected]> wrote:
> >
> > Dear community,
> >
> > I've following snippet
> >
> > <!-- split array of consumers -->
> > <split streaming="true">
> > <jsonpath>$.consumer[*]</jsonpath>
> > ...
> > <setProperty
> > name="consumerComponents"><simple>${in.body}</simple></setProperty>
> > </split>
> > <!-- log the consumer template snippet -->
> > <log message="template snippet: ${exchangeProperty.consumerComponents}" />
> >
> > As I made the experience the lifetime of an exchange property is limited to
> > inside the split boundaries.
> >
> > Is there an other way (except a custom aggregation strategy) to define a
> > context wide variable?
> >
> > Best
> > - Gerald
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2