activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugeny N Dzhurinsky <>
Subject Message announcement and routing
Date Mon, 25 Aug 2008 10:42:21 GMT

Can somebody please take a look at my question below and let me know is it
possible to achieve such behavior with ActiveMQ?

I need to distribute the system which is doing heavy calculation for clients.
This means the client sends the initial query to start the calculation task to
the JMS network. In the JMS network there is several consumer hosts which have
the consumer application listening to the query. This application has a
thread pool of workers, which aimed to do the job.

Now, the flow of typical request processing is as below:

1) the client sends the request to allocate the job. One of free consumers
pick up this request, prepares the environment and then sends back to the
client's temporary queue the response about it is ready to serve.
(request-response as described in the ActiveMQ FAQ).

2) the client sends the sequence of commands and data to be processed by the
consumer as a set of messages, the consumer does it's job and provides the
producer with the set of responses.

3) the client gets finished and tells the worker it is free, so the worker can
pick up the job requests from other clients.

At the first look, allocation of "command channel" can be done with having
temporary queues: once the worker gets the initial request, it creates the
temporary queue and sends back to the client the reference to the queue in JMS
reply-to header. 

The worker does not acknowledge the JMS broker it had processed the message,
so the broker do not tries to send the initial request to another clients and
does not relay another requests from clients to this worker. I am not sure is
it works in this way?

Once the worker does the job serving the client's requests within it's
temporary queue, the worker sends the acknowledge to the broker to identify
the message is processed and the worker is ready to serve another messages.

Does everything I explained makes sense and can be done with ActiveMQ?

Thank you in advance!

Eugene N Dzhurinsky

View raw message