Skip to content

Commit 1c10d6a

Browse files
Merge branch 'johanrhodin-NewChannelConsumerLimits'
2 parents bb21df7 + 46e6bc7 commit 1c10d6a

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

docs/channels/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,16 @@ Clients that attempt that will run into an error that looks like this in the log
248248
failed to negotiate connection parameters: negotiated channel_max = 2047 is higher than the maximum allowed value (32)
249249
```
250250

251+
### Maximum number of Channels per Node
252+
253+
It is possible to configure the maximum number of channels that are allowed to be open on each node in a cluster using the
254+
configuration parameter `channel_max_per_node`:
255+
256+
```ini
257+
# no more than 500 channels can be opened on each node at the same time
258+
channel_max_per_node = 500
259+
```
260+
251261

252262
## Monitoring, Metrics and Diagnostics {#monitoring}
253263

docs/consumers.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ See [Java client guide](/client-libraries/java-api-guide#consuming) for examples
140140

141141
See [.NET client guide](/client-libraries/dotnet-api-guide#consuming) for examples.
142142

143-
### Message Properties and Delivery Metadata {#message-properties}
143+
## Message Properties and Delivery Metadata {#message-properties}
144144

145145
Every delivery combines message metadata and delivery information. Different client
146146
libraries use slightly different ways of providing access to those properties. Typically
@@ -370,6 +370,15 @@ See [Java client guide](/client-libraries/java-api-guide#consuming) for examples
370370

371371
See [.NET client guide](/client-libraries/dotnet-api-guide#consuming) for examples.
372372

373+
## Limiting the number of Consumers per channel
374+
375+
In some scenarios where consumer leaks can happen it is good to limit the number of consumers that can be active on
376+
each channel. This can be configured in [rabbitmq.conf](./configure#config-file) using the setting `consumer_max_per_channel`:
377+
378+
```ini
379+
consumer_max_per_channel = 100
380+
```
381+
373382
## Fetching Individual Messages ("Pull API") {#fetching}
374383

375384
With AMQP 0-9-1 it is possible to fetch messages one by one using the `basic.get` protocol

versioned_docs/version-3.13/channels/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ Clients that attempt that will run into an error that looks like this in the log
248248
failed to negotiate connection parameters: negotiated channel_max = 2047 is higher than the maximum allowed value (32)
249249
```
250250

251+
### Maximum number of Channels per Node
252+
253+
It is possible to configure the maximum number of channels that are allowed to be open on each node in a cluster using the
254+
configuration parameter `channel_max_per_node`:
255+
256+
```ini
257+
# no more than 500 channels can be opened on each node at the same time
258+
channel_max_per_node = 500
259+
```
251260

252261
## Monitoring, Metrics and Diagnostics {#monitoring}
253262

versioned_docs/version-3.13/consumers.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,16 @@ See [Java client guide](/client-libraries/java-api-guide#consuming) for examples
140140

141141
See [.NET client guide](/client-libraries/dotnet-api-guide#consuming) for examples.
142142

143-
### Message Properties and Delivery Metadata {#message-properties}
143+
## Limiting the number of Consumers per channel
144+
145+
In some scenarios where consumer leaks can happen it is good to limit the number of consumers that can be active on
146+
each channel. This can be configured in [rabbitmq.conf](./configure#config-file) using the setting `consumer_max_per_channel`:
147+
148+
```ini
149+
consumer_max_per_channel = 100
150+
```
151+
152+
## Message Properties and Delivery Metadata {#message-properties}
144153

145154
Every delivery combines message metadata and delivery information. Different client
146155
libraries use slightly different ways of providing access to those properties. Typically

0 commit comments

Comments
 (0)