> I know that I will get the result when the request is solved in queue, but
> for example, when I am processing big amount of data, I don't want to wait
> 20 seconds.

You won't wait. :) You will submit task to the queue and immediately
return control to the "response" bean at the end of the route.

In the meantime another route will consume orders from the queue and
create users in the background:

from("activemq:queue:users.add").
  bean(SlowBeanAddingUsers.class).
  to("activemq:queue:users.done");

from("activemq:queue:users.done").to("mock:notifyMeWhenUserHasBeenCreated");

You're on the right track with your example. :)

Cheers.

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com

Reply via email to