[rabbitmq-discuss] Message distribution policy
Simon MacMullen
simon at rabbitmq.com
Tue Dec 3 12:04:54 GMT 2013
You'd need to configure the consumer processes to take the consumer
priority they should use from a command line parameter or similar then.
It's not really possible to say "the first process in it's list that's
available for processing" since the consumers are not considered to be
in any order (except priority order) within RabbitMQ.
Cheers, Simon
On 03/12/13 11:35, Luis Rascão wrote:
> I was referring to the rabbit priorities, in my scenario i have a
> process consumer.exe that connects to rabbit and consumes messages from
> a queue, suppose i launch this process 5 times, i end up with 5
> consumers for the queue, if i specify the same priority for all of them
> they will end up receiving the messages in round robin, because that's
> the way rabbit distributes them.
> What i'm looking for is a way to tell rabbit to forget about round robin
> and just send the message to the first process in it's list that's
> available for processing
>
>
> On Tue, Dec 3, 2013 at 11:31 AM, Simon MacMullen <simon at rabbitmq.com
> <mailto:simon at rabbitmq.com>> wrote:
>
> These are not OS priorities - the priority is set by an argument to
> the basic.consume method. Multiple consumers within the same OS
> process can have different priorities.
>
> Cheers, Simon
>
>
> On 03/12/13 11:27, Luis Rascão wrote:
>
> If i understood correctly multiple consumers with the same high
> priority
> will receive the messages in round-robin.
> This is easier if the processes were different binaries, they are in
> fact the same binary, to use priorities i would have to
> attribute higher
> priorities as i launch the multiple instances of the binary, is
> there
> some other way?
>
>
>
> On Tue, Dec 3, 2013 at 11:23 AM, Simon MacMullen
> <simon at rabbitmq.com <mailto:simon at rabbitmq.com>
> <mailto:simon at rabbitmq.com <mailto:simon at rabbitmq.com>>> wrote:
>
> Is this what you are looking for?
>
> http://www.rabbitmq.com/____consumer-priority.html
> <http://www.rabbitmq.com/__consumer-priority.html>
>
> <http://www.rabbitmq.com/__consumer-priority.html
> <http://www.rabbitmq.com/consumer-priority.html>>
>
> Cheers, Simon
>
> On 03/12/13 11:19, Luis Rascão wrote:
>
> Hi all,
> Supose you have 3 processes consuming messages from a
> queue, i
> guess by
> default the messages will be distributed to the
> consumers in a
> round-robin fashion (p1, p2, p3, p1, etc). Is there a
> way to
> change this
> distribution policy so that always the first free process
> handles the
> message? For example if p1 is always available then it
> would
> handle all
> the queued messages.
> thanks in advance
>
>
> ___________________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.__rabbi__tmq.com
> <http://rabbitmq.com>
> <mailto:rabbitmq-discuss at __lists.rabbitmq.com
> <mailto:rabbitmq-discuss at lists.rabbitmq.com>>
> https://lists.rabbitmq.com/____cgi-bin/mailman/listinfo/____rabbitmq-discuss
> <https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss>
>
>
> <https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss
> <https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>>
>
>
>
> --
> Simon MacMullen
> RabbitMQ, Pivotal
>
>
>
>
> --
> Simon MacMullen
> RabbitMQ, Pivotal
>
>
--
Simon MacMullen
RabbitMQ, Pivotal
More information about the rabbitmq-discuss
mailing list