- 允许的消息类型有哪些(字符串、字节、整数等)?
- 消息的最大大小是多少?
- 队列和交换机的最大数量是多少?
最大消息大小是多少?
在3.8.0版本之前,它曾经是2 GiB:
%% Trying to send a term across a cluster larger than 2^31 bytes will
%% cause the VM to exit with "Absurdly large distribution output data
%% buffer". So we limit the max message size to 2^31 - 10^6 bytes (1MB
%% to allow plenty of leeway for the #basic_message{} and #content{}
%% wrapping the message body).
-define(MAX_MSG_SIZE, 2147383648).
参考:https://github.com/rabbitmq/rabbitmq-common/blob/v3.7.21/include/rabbit.hrl#L279
自版本3.8.0以来已经是512 MiB:
%% Max message size is hard limited to 512 MiB.
%% If user configures a greater rabbit.max_message_size,
%% this value is used instead.
-define(MAX_MSG_SIZE, 536870912).
参考:https://github.com/rabbitmq/rabbitmq-common/blob/v3.8.0/include/rabbit.hrl#L238
请查看robthewolf的答案。
最大消息大小为2GB,但是对于这样大小的消息进行性能调优并不有效。最大消息大小
RabbitMQ服务器软件没有对队列数量设置硬限制,但是服务器运行的硬件可能会影响此限制。
3a. 默认情况下,服务器没有对队列长度设置限制。但是,可以通过服务器端策略(配置)或客户端策略来限制队列长度。最大队列长度
有关更多信息和链接,请参见相关帖子。