Class: MQ::Queue

Inherits:
Object show all
Defined in:
lib/nanite/amqp.rb

Instance Method Summary collapse

Instance Method Details

#recover(requeue = false) ⇒ Object

Asks the broker to redeliver all unacknowledged messages on a specifieid channel. Zero or more messages may be redelivered.

  • requeue (default false)

If this parameter is false, the message will be redelivered to the original recipient. If this flag is true, the server will attempt to requeue the message, potentially then delivering it to an alternative subscriber.



11
12
13
14
15
16
# File 'lib/nanite/amqp.rb', line 11

def recover requeue = false
  @mq.callback{
    @mq.send Protocol::Basic::Recover.new({ :requeue => requeue })
  }
  self
end