activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Etienne Carouy" <etienne.car...@market-ip.com>
Subject RE:
Date Mon, 24 Apr 2006 11:42:21 GMT

Thanks a lot.


> Hi,
>
> First of all thanks for your answer.
>
> A queue can have multiple consumers? Until now I think that a queue is a
> Point to Point model (only one publisher        and one consumer per
queue).

A common misunderstanding I think.

A queue basically means only 1 consume gets the message; but you can
have many consumers consuming from a queue; then the message broker
acts as a great load balancer with auto-failover and reliability etc.

e.g. if a machine dies while processing a message (but not
acknowledging it) then the message is redeilvered for you to another
consumer.


> My application receives a lot of message per second but the processing
time
> is too long (about 2, 3 seconds per message).So I have a first application
> that do some work (ack some message and so on) and post messages in a
> (topic/queue). A second application consume message and do all the stuff.
>
> My question is : If the load continue to increase, it will be necessary to
> dispatch message on multiple computer but I have to process only once each
> message. What is the best way to do that (Topic or Queue)?

A queue.

Just put each message on a queue then run as many machines as you want
pulling messages off the queue and processing them. ActiveMQ will only
dispatch each message to one consumer and you can scale to as many
machines as you can afford :)

--

James
-------
http://radio.weblogs.com/0112098/


Mime
View raw message