camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Gargan <>
Subject Re: ActiveMQ - Camel as client POST?
Date Wed, 23 Dec 2009 01:05:03 GMT
Rest assured you're in the right place, Camel is exactly what you need! By
POST i'm going to assume your service is a HTTP server of some kind?

By way of a simple example if the service is a simple http server expecting
json, it might be as easy as defining a route as follows

public class SimpleJsonHttpRoute extends RouteBuilder
   public void configure() throws Exception

You would use a producer template to send the hibernate pojo to the simple
service endpoint

ProducerTemplate template = camelContext.createProducerTemplate();
MyPojo entity = dao.loadPojo(id);
template.sendBody("direct:simple-http-send", entity);

This would cause camel to convert the entity to a JSON string using XStream
and use this as the content for a http request to the service at

I've left out a few details here, but as Claus mentions (below), there are
tons of examples and documentation to help you pick exactly what you need.
If you have any questions then ping the list and someone will be happy to



from an earlier mail by Claus...
Of course there is the camel documentation at

And the tutorials

And examples

And some blogs, articles on other sites at

And this thesis on Camel, although a bit old

And then there is a book in the works (I am one of the authors)

And FUSE also have some additional documentation

On Tue, Dec 22, 2009 at 4:16 PM, user09772 <> wrote:
> Hey,
> A oracle table is enqueuing ids to an activemq.  i Have a service as the
> consumer of the queue, which dequeues ids from the queue and does a
> lookup based on that id, and eventually gets a POJO (from hibernate).  I
> need a way to send this pojo to another service.  Can Camel do this for
> I've not used camel before.  If not, what is the best way to send a post
> another service in this scenario.
> Thanks.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message