activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwc% <>
Subject How to integrate a long running task using Camel
Date Tue, 17 Feb 2009 21:11:09 GMT


I have a Camel component that is long running (up to 2 minutes), and the
request/respond is done via a pair ActiveMQ queues. Is there a way with
Camel to wait for the completion of the long running task before replying
without using a blocking thread?

The simple solution is to let the thread block on the producer of this long
running component, and the reply will be sent back to the client when the it
is done.  I want to avoid that.  Here is what I like to have:

  RequestQueue -> ComponentA.process() -> ComponentB (Thread-1 detached)
  ComponentB.process() -> ComponentC.process() -> ReplyQueue

Here ComponentB is the long running task.  The main idea is to have separate
threads processing the request and respond so that a client request will not
tie up a thread on the server side for the duration of the request/respond.

Note that the pair of queues (one permanent and temporary) is managed by
ActiveMQ such that the temporary Queue is created by ActiveMQ/Camel at
request time.



View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message