activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: How to Throttle Message Processing in Jencks?
Date Wed, 29 Mar 2006 16:38:07 GMT
On 3/29/06, smith999 <> wrote:
> I am using ActiveMQ and Jencks. I have a JMS Queue that will be bulk loaded
> with thousands of messages. After this point I want message driven POJOs to
> process them (inside a Web Container) over the course of several days.
> During business hours I only want a few threads (listeners) processing the
> messages, but during the night I would like to assign more threads
> (listeners) to increase processing. Is there a way to accomplish this using
> Jencks? I want to do this at runtime (programmatically) without bringing
> down the Web Container or redeploying. Or is throttling done outside of
> Jencks?

This should be totally possible; though its certainly a brand new
requirement we'd never thought of adding ourselves up to now :)

One way to do this is today to configure the system so that it has the
right concurrency & thread pool size for your default intra-day
requirements, then just deploy a new web app (or start a separate
process) using a scheduler, for those periods of time you are happy to
increase the concurrency.

Another option could be to use a scheduler to reconfigure the thread
pool sizes that Jencks uses; we use dependency injection in Jenks to
configure all of this stuff so it should be pretty easy to write some
kind of 'scheduled size' thread pool that does exactly what you want.



View raw message