[rabbitmq-discuss] Message Invisible Mode
tonyg at lshift.net
Fri Oct 19 17:22:35 BST 2007
Carl Trieloff wrote:
> AMQP 0-10 acquire-mode does this for you
(Aside: interesting! I'm looking forward to checking out the 0-10
Just to add to Carl's point about 0-10, the current broker
implementations only support the kind of locking you mention partially.
There's no notion of timeout - instead, channel-closing or explicit
accept/reject is used.
That is, in 0-8/0-9, once a message is delivered to a consumer, either
via basic.deliver or basic.get-ok, the consumer is permitted to hold on
to it for as long as they please before accepting or rejecting it. While
they're holding on to it, the broker is forbidden from offering it to
any other consumer.
Messages are rejected either by explicit action, or by the closing of
the channel. Messages are accepted by basic.ack.
If a message is rejected, either explicitly or implicitly as part of
channel or connection closure, the message MAY be redelivered to some
other consumer by the broker.
So, to summarise: so long as you were after the basic "locking" feature,
and not the "timeout" part, then hopefully, current implementations do
what you want :-)
> joe lee wrote:
>> Let say you have 1 producer and 3 consumers. Producer places a
>> message in the queue. One of the consumer picks up the message and
>> process it. While it's processing it, is there a way to make the
>> message in queue to go invisible mode on user defined time (30sec,
>> 1min so on), so that other 2 consumers don't pick up the same message
>> and start processing? Like in Amazon SQS. Once the time limit has
>> passed 30sec, or 1min, message become visible, if message has not been
>> processed and deleted by consumer 1.
 Tony Garnock-Jones | Mob: +44 (0)7905 974 211
 LShift Ltd | Tel: +44 (0)20 7729 7060
  http://www.lshift.net/ | Email: tonyg at lshift.net
More information about the rabbitmq-discuss