Changed streaming payload size (we let aeron manage fragmentation as much as possible, as they do it more efficiently than we can

This commit is contained in:
Robinson 2022-06-11 22:34:16 +02:00
parent 7394b6abe2
commit 29dec146aa
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -281,10 +281,9 @@ internal class StreamingManager<CONNECTION : Connection>(private val logger: KLo
// payload size is for a PRODUCER, and not SUBSCRIBER, so we have to include this amount every time.
// MINOR fragmentation by aeron is OK, since that will greatly speed up data transfer rates!
var maxPayloadLength = publication.maxPayloadLength()
if ((maxPayloadLength * 8) < publication.maxMessageLength()) {
maxPayloadLength *= 8
}
// the maxPayloadLength MUST ABSOLUTELY be less that the max size + header!
var maxPayloadLength = publication.maxMessageLength() - 200
val header: ByteArray
val headerSize: Int