You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2008/11/27 21:52:05 UTC

[jira] Resolved: (CAMEL-1108) ParallelProcessing and executor flags are ignored in Multicast processor

     [ https://issues.apache.org/activemq/browse/CAMEL-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1108.
--------------------------------

    Fix Version/s: 1.5.1
                   2.0.0
       Resolution: Fixed

I did some code polishing and found the issue myself.

I have fixed it in 2.0 and 1.x

> ParallelProcessing and executor flags are ignored in Multicast processor
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-1108
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1108
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.5.0
>         Environment: Windows XP, Java 6
>            Reporter: Vadim Katz
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>         Attachments: MulticastProcessor.java
>
>
> The parallelProcessing and executor arguments are ignored in the constructor of MulticastProcessor. 
> Here is a call that MulticastType makes
> {code:title=org.apache.camel.model.MulticastType.java}
>     return new MulticastProcessor(list, aggregationStrategy, isParallelProcessing(), threadPoolExecutor);
> {code}
> MulticastProcessor ignores parallelProcessing and executor arguments and invokes a chain constructor with "..,false, null,.."
> {code:title=org.apache.camel.processor.MulticastProcessor.java}
>     public MulticastProcessor(Collection<Processor> processors, AggregationStrategy aggregationStrategy, boolean parallelProcessing, ThreadPoolExecutor executor) {
>         this(processors, aggregationStrategy, false, null, false);
>     }
>     public MulticastProcessor(Collection<Processor> processors, AggregationStrategy aggregationStrategy, boolean parallelProcessing, ThreadPoolExecutor executor, boolean streaming) {
>         notNull(processors, "processors");
>         this.processors = processors;
>         this.aggregationStrategy = aggregationStrategy;
>         this.isParallelProcessing = parallelProcessing;
>         if (isParallelProcessing) {
>             if (executor != null) {
>                 this.executor = executor;
>             } else { 
>                 // setup default Executor
>                 this.executor = new ThreadPoolExecutor(processors.size(), processors.size(), 0, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(processors.size()));
>             }
>         }
>         this.streaming = streaming;
>     }
> {code}
> Attached a patch but have not tested it. Also need a unit test for this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.