我想使用Akka Remoting在actor之间通过网络交换消息,但对于大型String消息,我收到以下错误:
akka.remote.OversizedPayloadException: Discarding oversized payload
sent to Actor :: max allowed size 128000 bytes
, actual size of encoded class scala.
我该如何解决这个限制?
答案 0 :(得分:16)
我添加了以下配置,现在一切正常:
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
}
}
}