From dc54fa08a213929790a76b270aa2a5a3fb2cbdd2 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 1 Apr 2015 14:14:15 +0200 Subject: [PATCH] =act #15914 Clarify and correct max-received-message-size (cherry picked from commit c8c07e7a9f8aa4a9b65a9a75e3eb29ea24a99f1f) --- akka-actor/src/main/resources/reference.conf | 3 +++ akka-actor/src/main/scala/akka/io/Tcp.scala | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/akka-actor/src/main/resources/reference.conf b/akka-actor/src/main/resources/reference.conf index 9d1e6fa1d1..8fcf18cd06 100644 --- a/akka-actor/src/main/resources/reference.conf +++ b/akka-actor/src/main/resources/reference.conf @@ -603,6 +603,9 @@ akka { # The maximum number of bytes delivered by a `Received` message. Before # more data is read from the network the connection actor will try to # do other work. + # The purpose of this setting is to impose a smaller limit than the + # configured receive buffer size. When using value 'unlimited' it will + # try to read all from the receive buffer. max-received-message-size = unlimited # Enable fine grained logging of what goes on inside the implementation. diff --git a/akka-actor/src/main/scala/akka/io/Tcp.scala b/akka-actor/src/main/scala/akka/io/Tcp.scala index 693c329d08..c20e5b0cd0 100644 --- a/akka-actor/src/main/scala/akka/io/Tcp.scala +++ b/akka-actor/src/main/scala/akka/io/Tcp.scala @@ -533,7 +533,7 @@ class TcpExt(system: ExtendedActorSystem) extends IO.Extension { } val ReceivedMessageSizeLimit: Int = getString("max-received-message-size") match { case "unlimited" ⇒ Int.MaxValue - case x ⇒ getIntBytes("received-message-size-limit") + case x ⇒ getIntBytes("max-received-message-size") } val ManagementDispatcher: String = getString("management-dispatcher") val FileIODispatcher: String = getString("file-io-dispatcher")