Method: Bunny::Channel#prefetch

Defined in:
lib/bunny/channel.rb

#prefetch(count, global = false) ⇒ Object

Sets how many messages will be given to consumers on this channel before they have to acknowledge or reject one of the previously consumed messages

Parameters:

  • prefetch_count (Integer)

    Prefetch (QoS setting) for this channel

  • global (Boolean) (defaults to: false)

    Whether to use global mode for prefetch:

    • +false+: per-consumer
    • +true+: per-channel Note that the default value (+false+) hasn't actually changed, but previous documentation described that as meaning per-channel and unsupported in RabbitMQ, whereas it now actually appears to mean per-consumer and supported (https://www.rabbitmq.com/consumer-prefetch.html).

See Also:



446
447
448
# File 'lib/bunny/channel.rb', line 446

def prefetch(count, global = false)
  self.basic_qos(count, global)
end