You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Joe San <co...@gmail.com> on 2012/08/18 10:20:16 UTC

Producer and ConsumerTemplate

Camel fans,

The Producer and Consumer templates - are they kind of mock interfaces to
create a Producer and a Consumer? What benefits do they serve when
comparing against the different EndPoint Components?

Regards,
Jothi

Re: Producer and ConsumerTemplate

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can read about the producer template here
http://camel.apache.org/producertemplate.html

The idea is similar to the Spring Templates, eg JmsTemplate, JdbcTemplate etc.
To make it easier to use a framework, eg in those from Spring, eg to
work with JMS or JDBC.

The Camel Producer- and ConsumerTemplate, its for end users to make it
easier to send and receive messages from Camel endpoints.

So with the ProducerTemplate you can in 1 line of code send a message
to *any* Camel endpoint.



On Sat, Aug 18, 2012 at 10:20 AM, Joe San <co...@gmail.com> wrote:
> Camel fans,
>
> The Producer and Consumer templates - are they kind of mock interfaces to
> create a Producer and a Consumer? What benefits do they serve when
> comparing against the different EndPoint Components?
>
> Regards,
> Jothi



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen