camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henryk Konsek <>
Subject Re: Invoke Camel route from bean
Date Wed, 19 Sep 2012 21:06:04 GMT

> In some work flows service class expects response and some times it does not.

If response is requested, consider using asynchronous version of
ProducerTemplate methods returning java.util.Future instances. For
example ProducerTemplate#asyncRequestBody . This approach can
significantly improve performance of typical synchronous MVC

> what is the best way to do that? Camel Proxies or Producer template or
> any other way out there?

It depends :) .

>   like
> from("myPojo:myMethod").to("direct:start");

You can't use Bean component [1] at the beginning of the route. If you
integrate client application with Camel infrastructure you would  like
to start your route with Direct endpoint...

// send message from client (webapp for example)
// to Camel infrastructure.

Consider also using Guava Event Bus [2] for that purpose:

// In you MVC controller
EventBus webAppEventBus;
... EventFromMvcController());

// In Camel route

Kind regards.


Henryk Konsek

View raw message