Maximum message size

2,601 views
Skip to first unread message

Matan Safriel

unread,
Jun 14, 2014, 9:50:40 AM6/14/14
to akka...@googlegroups.com
Hi,

I'd like to verify what is the configuration property that sets the maximum allowed size of a message that can be sent to actors (if there is such a limitation imposed by Akka), and what would be the correct way to check the size of messages in my code (assuming that calculating the size needs to follow some serialization logic carried out by Akka so that it gets the correct size that Akka sees). Also is there any reason to resort to auxiliary mechanisms for transferring mildly large messages between agents, in terms of the Akka actor philosophy.

Thanks
Matan

Luis Medina

unread,
Jun 14, 2014, 2:22:12 PM6/14/14
to akka...@googlegroups.com
I can only speak to your first question. The setting you're looking for is: "akka.remote.netty.tcp.maximum-frame-size". I think by default it's 120000b. I had to bump up mine. Not sure about your second question.

Akka Team

unread,
Jun 15, 2014, 6:41:09 AM6/15/14
to Akka User List
Hi Matan,

As Luis pointed out, the configuration that sets the remoting frame-size limit is akka.remote.netty.tcp.maximum-frame-size. If messages exceed this limit they will be dropped and logged. As for checking the size of your messages, you should use a serializer in remoting that allows you to carefully control the size of your messages. Protobuf is quite OK for that but Java serialization is very unpredictable in this regard.

As for transferring large messages, fragmentation is considered good practice even if we are not talking about Akka. Another option is to open up a dedicated side-channel (e.g. a TCP based server using akka.io) and use it for transferring large amount of data, and use akka remoting as the control channel.

-Endre


On Sat, Jun 14, 2014 at 8:22 PM, Luis Medina <lu4...@gmail.com> wrote:
I can only speak to your first question. The setting you're looking for is: "akka.remote.netty.tcp.maximum-frame-size". I think by default it's 120000b. I had to bump up mine. Not sure about your second question.

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

Patrik Nordwall

unread,
Jun 15, 2014, 8:00:06 AM6/15/14
to akka...@googlegroups.com



15 jun 2014 kl. 12:40 skrev Akka Team <akka.o...@gmail.com>:

Hi Matan,

As Luis pointed out, the configuration that sets the remoting frame-size limit is akka.remote.netty.tcp.maximum-frame-size. If messages exceed this limit they will be dropped and logged. As for checking the size of your messages, you should use a serializer in remoting that allows you to carefully control the size of your messages. Protobuf is quite OK for that but Java serialization is very unpredictable in this regard.

Check out the log-frame-size-exceeding config setting, http://doc.akka.io/docs/akka/2.3.3/general/configuration.html#akka-remote

/Patrik

Ashesh Ambasta

unread,
Feb 1, 2016, 5:11:19 AM2/1/16
to Akka User List
At what point did message-frame-size become maximum-frame-size?

Am I missing something?

Patrik Nordwall

unread,
Feb 1, 2016, 7:48:06 AM2/1/16
to akka...@googlegroups.com
On Mon, Feb 1, 2016 at 11:11 AM, Ashesh Ambasta <ashesh....@gmail.com> wrote:
At what point did message-frame-size become maximum-frame-size?

Am I missing something?

Look at the documentation that matches the version that you are using: http://akka.io/docs/ 

If we changed this it was probably noted in one of the migration guides.
 


On Saturday, 14 June 2014 15:50:40 UTC+2, Matan S wrote:
Hi,

I'd like to verify what is the configuration property that sets the maximum allowed size of a message that can be sent to actors (if there is such a limitation imposed by Akka), and what would be the correct way to check the size of messages in my code (assuming that calculating the size needs to follow some serialization logic carried out by Akka so that it gets the correct size that Akka sees). Also is there any reason to resort to auxiliary mechanisms for transferring mildly large messages between agents, in terms of the Akka actor philosophy.

Thanks
Matan

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Patrik Nordwall
Typesafe Reactive apps on the JVM
Twitter: @patriknw

Reply all
Reply to author
Forward
0 new messages