11

我想使用 Akka Remoting 在演员之间通过网络交换消息,但是对于大字符串消息,我收到以下错误:

akka.remote.OversizedPayloadException: Discarding oversized payload 
sent to Actor :: max allowed size 128000 bytes
, actual size of encoded class scala.

我该如何解决这个限制?

4

1 回答 1

18

我添加了以下配置,现在一切正常:

akka {

  actor {
    provider = "akka.remote.RemoteActorRefProvider"
  }

  remote {
    maximum-payload-bytes = 30000000 bytes
    netty.tcp {
      hostname = "127.0.0.1"
      port = 2552
      message-frame-size =  30000000b
      send-buffer-size =  30000000b
      receive-buffer-size =  30000000b
      maximum-frame-size = 30000000b
    }
  }
}
于 2016-04-18T04:11:34.017 回答