activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Parallel processors on a single topic/queue
Date Tue, 24 Apr 2007 07:17:53 GMT
On 4/19/07, Pete Schwamb <> wrote:
> I'm using activemessaging to connect to a stomp interface on an ActiveMQ
> broker, and having trouble processing all of the messages that are coming
> over my subscription to a topic.
> The messages take a fair amount of cpu as they must be unzipped, processed,
> and stored to the db.  So much that I'd like to add another processor
> (subscriber) to help keep up with the message flow, but I'm not sure how to
> make two clients feed off of the same topic (not a queue, currently).

As soon as you want to load balance messages across multiple consumers
you want a queue...

as thats exactly what they do.

If you really want to keep the publish/subscribe semantics (so the
producer has no idea how many consumers/queues there might be) then
try using Virtual Topics

but I'd recommend just starting with a queue.

> I'd rather keep it a non-durable subscription, as I have a
> MaximumPendingMessageLimit set and would like to discard messages when the
> subscribers can't keep up.

Make sure to keep the prefetch down low if you want to enable eager
discarding of messages on slow consumers.

as the MaximumPendingMessageLimit kicks in only above the prefetch
value (which is by default pretty high for topics)


View raw message