Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Notice that we get the producer template using the createProducerTemplate method on the CamelContext. Then we send the input parameters to the direct:start endpoint and it will route it to the velocity endpoint that will generate the mail body. Since we use direct as the consumer endpoint (=from) and its a synchronous exchange we will get the response back from the route. And the response is of course the output from the velocity endpoint.

Info
titleAbout creating ProducerTemplate

In the example above we create a new ProducerTemplate when the reportIncident method is invoked. However in reality you should only create the template once and re-use it. See this FAQ entry.

We have now completed this part of the picture:

...