Skip to content

Commit

Permalink
Fix prefetch documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cressie176 committed Nov 27, 2023
1 parent 5f0ac2c commit f4da3ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions channel_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1287,18 +1287,20 @@ works in older versions of RabbitMQ (< v2.3.0) where `#nack` does not.

### <a name="channel_prefetch"></a>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
Expand Down

0 comments on commit f4da3ab

Please sign in to comment.