title: Making REST calls in parallel in Apache Camel
body: <p>I am using Apache Camel Java DSL in a Spring Boot project. In the Camel route, I am calling two rest services sequentially, combining their outputs and sending to another application from the Camel route. Now we are trying to call the REST services in parallel. We were able to call the REST services in parallel by implementing the following steps:</p>
  <ol>
  <li>In the route, first storing the two URLs of the two REST services in a list within an exchange.</li>
  <li>Applying Splitter EIP and parallelProcessing() on that EIP to call two differrent Camel routes in parallel which calls the REST service.</li>
  <li>Unmarshalling the response of the services from JSON to POJO</li>
  </ol>
  <p>The problem is if I use an aggregationStrategy to aggregate the responses, how canI handlethe scenarion when the two REST services will return two different objects after unmarshalling the response? Also please suggest any better approach of calling the REST services in parallel and consolidating their responses.</p>