anchor.diff:  image::eip/BroadcastAggregate.gif[image]
   
   With Camel this pattern is implemented by using the xref:recipientList-eip.adoc[Recipient List]
  -and the xref:aggregate-eip.adoc[Aggregate] patterns.
  +which comes with aggregation built-in. This is often the simplest solution. However, there can
  +be some complex use-cases where you would need not use the built-in aggregator, and instead
  +use the more powerful xref:aggregate-eip.adoc[Aggregate] EIP for aggregation.
   
  -== Sample
  +== Using only Recipient List
   
  -In this example we want to get the best quote for beer from several different vendors.
  -We use a dynamic Recipient List to get the request for a quote to all vendors and an Aggregator
  -to pick the best quote out of all the responses. The routes for this are defined as:
  +TODO: Simple example
  +
  +
  +== Using both Recipient List and Aggregator EIP
  +
  +In this example we want to get the best quote for beer from several vendors.
  +
  +We use xref:recipientList-eip.adoc[Recipient List] to get the request for a quote to all vendors
  +and an xref:aggregate-eip.adoc[Aggregate] to pick the best quote out of all the responses.
  +
  +The routes for this are defined as:
   
   [source,xml]
   ----
  -<camelContext xmlns="http://camel.apache.org/schema/spring">
  +<routes>
  +
     <route>
       <from uri="direct:start"/>
       <recipientList>
  
positive.code: 
      public void quote(@XPath("/quote_request/@item") String item, Exchange exchange) {
          if ("beer".equals(item)) {
              exchange.getIn().setBody(beerPrice);
              quoteAggregator.send(exchange);
          } else {
              // ignore no quote
  
negative.code: 
    <route>
      <from uri="seda:quoteAggregator"/>
      <aggregate strategyRef="beerAggregator" completionTimeout="1000">
        <correlationExpression>
          <header>quoteRequestId</header>
        </correlationExpression>
        <to uri="mock:result"/>
      </aggregate>
    </route>
  
  </routes>
  ----
  
  So in the first route you see that the xref:recipientList-eip.adoc[Recipient List] is looking at the
  listOfVendors header for the list of recipients. So, we need to send a message like:
  
  [source,java]
  ----
  Map<String, Object> headers = new HashMap<>();
  headers.put("listOfVendors", "bean:vendor1, bean:vendor2, bean:vendor3");
  headers.put("quoteRequestId", "quoteRequest-1");
  
  template.sendBodyAndHeaders("direct:start", "<quote_request item=\"beer\"/>", headers);
  ----
  
  