title: How to use camel recipentList
body: <p>I just try to get a camel route working using RecipentList. But first a question: What is the difference beween</p>
  
  <ul>
  <li>Multicast / RecipentList (both without parallel processing)</li>
  <li>multiple "to"
  ?</li>
  </ul>
  
  <p>In my case i want parallel processing for some of my routes. At the moment all use multiple </p>
  
  <p>"to" added within for loop:</p>
  
  <pre><code>RouteDefinition someRoute = createSomeRout(fromPart, id); \\ method
  for (String pcrfTarget : cepConfig.pcrfCepTargets()) {
      log.info("...to " + pcrfTarget);
      someRoute.to(pcrfTarget + "?mode=" + Mode.insertAddId.name());
  }
  </code></pre>
  
  <p>Is there an direct way to use recipientList and just add parallelProcessing at the end?
  I also tried to create a simple example but it fails (the only example in books and internet is one using/manipulating header :-(). Here is my example (error):</p>
  
  <pre><code>public class Experiments extends CamelTestSupport {
      private static final String MOCK2 = "mock:mock2";
      private static final String MOCK1 = "mock:mock1";
      private static String PCRF_TEST_FILES;
  
      public Experiments() throws URISyntaxException {
          PCRF_TEST_FILES = ClassLoader.getSystemResource("pcrf-files").toURI().toString();
      }
  
      @Test
      public void test() throws InterruptedException {
          MockEndpoint mockIn = getMockEndpoint(MOCK1);
          MockEndpoint mockOut = getMockEndpoint(MOCK2);
          mockIn.expectedMessageCount(5);
          mockOut.expectedMessageCount(5);
          // data in mock are available after this call
          assertMockEndpointsSatisfied();
      }
  
      /*
       * (non-Javadoc)
       *
       * @see org.apache.camel.test.junit4.CamelTestSupport#createRouteBuilder()
       */
      @Override
      protected RouteBuilder createRouteBuilder() throws Exception {
          return new RouteBuilder() {
  
              @Override
              public void configure() throws Exception {
                  //from(PCRF_TEST_FILES + "?noop=true").unmarshal().gzip().to(MOCK1).to(MOCK2); //working
                  from(PCRF_TEST_FILES + "?noop=true").unmarshal().gzip().recipientList(method(Experiments.class)).parallelProcessing(); //not working
              }
          };
      }
  
      @RecipientList
      public String[] recipents() {
          return new String[] { MOCK1, MOCK2 };
      }
  
  }
  </code></pre>
  
  <p>I get error:</p>
  
  <pre><code>org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[EDR_UPCC244_MPU842_0370_20140428000008.csv.gz]
  ...
  Caused by: java.lang.AssertionError: expected null, but was:&lt;[B@48d19957&gt;
  </code></pre>
  
  <p>I think for some reason camel tries to use content of files to get recipients?! Could someone provide an example how to dynamically create recipentList but not based on data that comes with exchange but on independent data (in my case given in configuration).</p>
  
  <p>Thanks</p>