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 | 0e78304aae0c0640a64208d7c59cc03866c442a3 (patch) | |
| tree | 9f055b48e1a403e6e72338b4e24b2b95b0b6fff7 /include | |
| parent | 910581a849499be0cec89bf9cd8f0ad044aa66b2 (diff) | |
| download | rabbitmq-server-git-0e78304aae0c0640a64208d7c59cc03866c442a3.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 bd7a0eedf5..0f1b7a506b 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). |
