From f4da3ab944391543efee82b03707051caeef9159 Mon Sep 17 00:00:00 2001 From: Stephen Cresswell <229672+cressie176@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:48:01 +0000 Subject: [PATCH] Fix prefetch documentation --- channel_api.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/channel_api.md b/channel_api.md index 54294046..02ae93ff 100644 --- a/channel_api.md +++ b/channel_api.md @@ -1287,18 +1287,20 @@ works in older versions of RabbitMQ (< v2.3.0) where `#nack` does not. ### Channel#prefetch -##### Promises and callback APIs +##### Promises API `#prefetch(count, [global])` -**NOTE**: Does not return a promise in the promises API, or accept a callback in the callback API. +##### Callback API + +`#prefetch(count, [[global], [function(err, ok) {...}]])` Set the prefetch count for this channel. The `count` given is the maximum number of messages sent over the channel that can be awaiting acknowledgement; once there are `count` messages outstanding, the server will not send more messages on this channel until one or more have been acknowledged. A falsey value for `count` indicates no such -limit. +limit. The server will reply (with an empty object) if successful. **NB** RabbitMQ v3.3.0 changes the meaning of prefetch (basic.qos) to apply per-*consumer*, rather than per-channel. It will apply to