You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Mills, Gary (GE Digital)" <ga...@ge.com> on 2018/05/18 15:43:33 UTC

Camel Splitter Group attribute injection not working

Hello,

can you inject a value from the config params file in to the splitter group attribute? if so, what is the proper way of doing it? thanks!

Is this possible? What am I doing wrong? Thank you!

<split streaming="true" >
<tokenize token="\n" group="{{noOfLines}}" /> <log message="Split Group Body: ${body}"/>
    <to uri="bean:extractHeader" />
    <to id="acceptedFileType" ref="pConsumer" /> </split>

<split streaming="true" >
<tokenize token="\n" group={{noOfLines}} /> <log message="Split Group Body: ${body}"/>
    <to uri="bean:extractHeader" />
    <to id="acceptedFileType" ref="pConsumer" /> </split>

Gary Lee Mills
Work:  331-777-2318



Re: Camel Splitter Group attribute injection not working

Posted by Alex Dettinger <al...@gmail.com>.
Hi Gary,

  Yes, the first extract should work. The second one is at least missing
some double quotes around the group xml attribute (should be
group="{{noOfLines}}").

Alex

On Fri, May 18, 2018 at 5:43 PM, Mills, Gary (GE Digital) <
gary.L.mills@ge.com> wrote:

> Hello,
>
> can you inject a value from the config params file in to the splitter
> group attribute? if so, what is the proper way of doing it? thanks!
>
> Is this possible? What am I doing wrong? Thank you!
>
> <split streaming="true" >
> <tokenize token="\n" group="{{noOfLines}}" /> <log message="Split Group
> Body: ${body}"/>
>     <to uri="bean:extractHeader" />
>     <to id="acceptedFileType" ref="pConsumer" /> </split>
>
> <split streaming="true" >
> <tokenize token="\n" group={{noOfLines}} /> <log message="Split Group
> Body: ${body}"/>
>     <to uri="bean:extractHeader" />
>     <to id="acceptedFileType" ref="pConsumer" /> </split>
>
> Gary Lee Mills
> Work:  331-777-2318
>
>
>