You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by James Strachan <ja...@gmail.com> on 2006/04/24 11:34:33 UTC

Re:

On 4/24/06, Etienne Carouy <et...@market-ip.com> wrote:
> Hi,
>
> I have a little question about message groups.
>
> In my application I need to dispatch message to only one consumer. (I have a
> thread that publish messages into some topics and multiple consumers on each
> topic). Ideally each message will be proceeded only by one consumer.

It shoulds like you want a queue not a topic if you want each message
to only go to one consumer?

--

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

RE:

Posted by Etienne Carouy <et...@market-ip.com>.
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/


Re:

Posted by James Strachan <ja...@gmail.com>.
On 4/24/06, Etienne Carouy <et...@market-ip.com> wrote:
> 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/

RE:

Posted by Etienne Carouy <et...@market-ip.com>.
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).


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)?

I hope that you understand what I mean.

Etienne


On 4/24/06, Etienne Carouy <et...@market-ip.com> wrote:
> Hi,
>
> I have a little question about message groups.
>
> In my application I need to dispatch message to only one consumer. (I have
a
> thread that publish messages into some topics and multiple consumers on
each
> topic). Ideally each message will be proceeded only by one consumer.

It shoulds like you want a queue not a topic if you want each message
to only go to one consumer?

--

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