diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2018-09-08 13:30:27 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2018-09-08 13:51:57 -0700 |
commit | 257d2918271e9fa3bf32170dc0d8a49ac323392f (patch) | |
tree | 29c5a7f6605c3e7a8290d1387cb65a175d042633 /librabbitmq/amqp.h | |
parent | 23c8fd736abda6331e38ca045735d636390336f5 (diff) | |
download | rabbitmq-c-257d2918271e9fa3bf32170dc0d8a49ac323392f.tar.gz |
Set AMQP_DEFAULT_MAX_CHANNELS to 2047
RabbitMQ set a new default limit of 2048 channels to prevent buggy
clients from consuming too many broker resources with open channels.
This change matches the default set in the Java client. See:
https://github.com/rabbitmq/rabbitmq-server/issues/1593
Fixes: #513
Diffstat (limited to 'librabbitmq/amqp.h')
-rw-r--r-- | librabbitmq/amqp.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h index 136a095..2983b16 100644 --- a/librabbitmq/amqp.h +++ b/librabbitmq/amqp.h @@ -328,13 +328,16 @@ char const *AMQP_CALL amqp_version(void); /** * \def AMQP_DEFAULT_MAX_CHANNELS * - * Default maximum number of channels (0, no limit) + * Default maximum number of channels (2047, RabbitMQ default limit of 2048, + * minus 1 for channel 0). RabbitMQ set a default limit of 2048 channels per + * connection in v3.7.5 to prevent broken clients from leaking too many + * channels. * * \sa amqp_login(), amqp_login_with_properties() * * \since v0.4.0 */ -#define AMQP_DEFAULT_MAX_CHANNELS 0 +#define AMQP_DEFAULT_MAX_CHANNELS 2047 /** * \def AMQP_DEFAULT_HEARTBEAT |