Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Message fragmentation in Aeron Messaging

  1. When a large message has to be fragmented because its size is greater than MTU size, does the fragmentation happen when placing the message on the logbuffer?

  2. if yes and a large message is broken up into 3 fragments, the 1st fragment’s header will have a flag ‘B’, the 2nd fragment wont have any flag for fragment position and the 3rd/final fragment’s header will a flag ‘E’.. When these fragments are sent to the subscriber, if the fragments are delivered out of order, for example if fragment 2 is delivered, how will aeron determine that a fragment has been received and not a complete message?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

In Aeron messaging, when a large message needs to be fragmented due to its size exceeding the Maximum Transmission Unit (MTU) size, the fragmentation occurs at the point of placing the message on the log buffer. Each fragment of the message is placed into separate terms of the log buffer, ensuring that they fit within the specified term-length.

Regarding the fragmentation flags you mentioned (‘B’ for the first fragment, no flag for the second fragment, and ‘E’ for the final fragment), these flags are part of the Aeron protocol and are used to indicate the position of the fragment within the original message:

  • ‘B’ Flag (Begin): Indicates the first fragment of the original message.
  • No Flag: Indicates a middle fragment of the original message.
  • ‘E’ Flag (End): Indicates the final fragment of the original message.

When these fragments are sent to the subscriber, Aeron relies on these flags to determine the order and completeness of the fragments. If fragments are delivered out of order, for example, if fragment 2 is delivered before fragment 1, Aeron uses sequence numbers to manage the ordering and ensure that the fragments are reassembled correctly.

Each fragment header contains a sequence number, which allows the receiver to determine the correct order of the fragments. When the subscriber receives the fragments, it uses the sequence numbers and the flags to identify the beginning, middle, and end of the message. If a fragment is missing or delivered out of order, the subscriber can detect this based on the sequence numbers and the absence of the ‘E’ flag for the final fragment.

Aeron ensures that a message is considered complete only when all fragments are received and assembled in the correct order, based on the sequence numbers and flags. If any fragments are missing or delivered out of order, the subscriber will not be able to reconstruct the original message, ensuring data integrity and reliability in the messaging process.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading