Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the asciidoc in the repository: https://github.com/apache/camel/blob/master/README.md https://github.com/apache/camel/blob/master/components/readme.adoc
The ProducerTemplate interface allows you to send message exchanges to endpoints in a variety of different ways to make it easy to work with Camel Endpoint instances from Java code.
It can be configured with a default endpoint if you just want to send lots of messages to the same endpoint; or you can specify an Endpoint or uri as the first parameter.
The sendBody() method allows you to send any object to an endpoint easily.
You can also supply an Exchange or a Processor to customize the exchange
The send*() methods use the default Message Exchange Pattern (InOnly, InOut etc) as the endpoint. If you want to explicitly perform a request/response (InOut) you can use the request*() methods instead of the send*() methods.
e.g. lets invoke an endpoint and get the response
Fluent interface (camel 2.18.0)
The FluentProducerTemplate provides a fluent syntax to ProducerTemplate,, examples: