diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-01-17 11:50:57 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-01-17 11:50:57 +0000 |
commit | d67e7fe58411585ec825e8153d5d70c193101d26 (patch) | |
tree | 9f055b48e1a403e6e72338b4e24b2b95b0b6fff7 /include | |
parent | b81c80f77d45d95029489e3cb7f3c9c872aa9e1c (diff) | |
download | rabbitmq-server-d67e7fe58411585ec825e8153d5d70c193101d26.tar.gz |
Limit maximum message size.
Diffstat (limited to 'include')
-rw-r--r-- | include/rabbit.hrl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl index bd7a0eed..0f1b7a50 100644 --- a/include/rabbit.hrl +++ b/include/rabbit.hrl @@ -111,3 +111,10 @@ -define(INVALID_HEADERS_KEY, <<"x-invalid-headers">>). -define(ROUTING_HEADERS, [<<"CC">>, <<"BCC">>]). -define(DELETED_HEADER, <<"BCC">>). + +%% 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). |