[rabbitmq-discuss] Streaming Lightweight Publisher Confirms ?

Alexandru Scvorţov alexandru at rabbitmq.com
Fri Sep 23 11:18:16 BST 2011


Hi,

>  1.if publish send message from queue and consumer doesn't return any 
>  acknowledgement in this case broker what to do?

On the broker: if the consumer doesn't acknowledge a message, the
message is kept until the consumer disconnects; at that point the
message is re-inserted on the queue.  The message is not considered
delivered until the consumer acknowledges it, so it will not cause a
publisher confirm to be issued.  Of course, while the broker is waiting
for the consumer to acknowledge the message, it may write it to disk, in
which case, the publisher confirm is issued immediately.

>  2. if broker is restart or crash in this period,it can store the 
>  unacknowledged message and resend to consumer.

Maybe.  If the publisher confirm was issued, and the broker crashes,
when it comes back up, it will attempt to re-deliver the message.  If
the publisher confirm was *not* issued, the message was probably
lost and the publisher will need to re-publish the message.

>  3. Is there is method to check all Publisher Confirmation.

What the publisher should probably do is this:
  1. confirmSelect the channel;
  2. publish some messages;
  3. call waitForConfirmsOrDie;
    3.1 if an exception was raised, the messages were probably lost and
    they need to be re-published;
    3.2 if no exception was raised, the broker has either written the
    messages to disk (and they will survive a broker restart) or it has
    delivered the messages to all consumers (and they have ack'd), so
    everything is fine and you can start publishing other messages.

Hope this clears things up.

Cheers,
Alex

On Wed, Sep 21, 2011 at 04:19:14AM -0700, sameekmishra wrote:
> 
> Hi
>  
>  I want to make sure using channel confirmation.i have following 
>  question using Streaming Lightweight Publisher Confirms:
>  
>  1.if publish send message from queue and consumer doesn't return any 
>  acknowledgement in this case broker what to do?
>  
>  2. if broker is restart or crash in this period,it can store the 
>  unacknowledged message and resend to consumer.
> 
>  3. Is there is method to check all Publisher Confirmation.
> 
>  Thanks
> 
> -- 
> View this message in context: http://old.nabble.com/Streaming-Lightweight-Publisher-Confirms---tp32503738p32503738.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list