On 1/29/07 9:31 PM, "igah" <[EMAIL PROTECTED]> wrote:

> 
> hi there,
> 
> it's easy to load balance a queue's consumers -- by starting multiple
> consumer threads (in the same or different processes). but how to do this
> for a subscriber.
> 
> let me explain what I mean with a use case like this: a message is published
> to a topic, where there are two subscribers, each of which does something
> different. let's say one subscriber's message processing rate is slower than
> the message arrival rate. it's natural to start multiple of them to
> distribute the load. but you cannot start another identical instance of the
> subscriber because that would cause the same message to be processed twice.

I believe that JMS flow control can prevent this from occurring.  The
publisher will not send the next message until all subscribers have consumed
it.

> 
> i can think of one solution where i create another queue and forward all the
> messages from the topic to the queue. then we can start as many consumers on
> that queue as we want to. this requires management of this "forwarder". (you
> need to make sure it's always up, etc.)
> 
> is there a better or more "out-of-box" approach?
> 
> thanks in advance.

--
Daryl
http://itsallsemantics.com

"I¹m afraid of the easy stuffŠ its always harder than it seemsŠ"
-- Bill Hampton, 2006




Reply via email to