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")