Hi

Yeah we can do this more easier in the future. I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-9061


On Thu, Aug 6, 2015 at 5:51 PM, furchess123 <con...@hotmail.com> wrote:
> Hi,
> I am using a splitter to read a file. The definition looks something like
> this:
>
>
>            split().
>                 tokenize(System.lineSeparator(),
> readerConfig.getLinesPerChunk()).
>                 streaming().
>                 parallelProcessing().
>                 bean(myProcessor).
>                 ...
>             end();
>
>
> Including  ".parallelProcessing()" in the split definition unequivocally
> enables multithreading. But what if I want to enable or disable parallel
> processing depending on an external configuration property? What is the best
> way to do it in Java DSL? Do I have to use choice().when() etc? Or is there
> a better, more elegant way?  I know the SplitDefinition class has the
> setParallelProcessing(boolean) method. But I am not clear on how I can use
> it in the DSL configuration?
>
> Thanks!
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/DSL-to-dynamically-enable-disable-parallelProcessing-tp5770389.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Reply via email to