Messaging Terminology
Sometimes, different terminology is used to refer to what appears to be the same thing. Here's a recap of the different terminology used as a message passes through a Network Publication.
An application passes messages to a Publication:
The Publication breaks up large messages into fragments based on the MTU. If a message fits into an MTU, it is not fragmented, so you could refer to that as a message or a fragment:
When the Publication writes fragments into the log buffer, it writes them in DATA frames. The log buffer may also contain PAD frames, especially at the end of a Term. Each Frame starts with a Frame header:
The Sender sends as many contiguous frames as it can fit into the MTU in each UDP packet. It doesn't care about message boundaries, nor whether they are DATA or PAD frames. Here, you can see Packet 2 contains Data Frame 2, Data Frame 3 and the PAD frame (when sending PAD frames, only the header is sent):
When the Receiver receives a UDP packet, it reads the TermId and TermOffset from the first Frame header, then copies the whole packet to that position in the Image log buffer - it doesn't need to look at anything after the first frame. Copying Packet 2 like this recreates Data Frame 2, Data Frame 3 and the PAD frame.
When polled, the Subscription returns fragments to the receiving application. It does not wait for all the fragments of a fragmented message to arrive before starting to return them:
If the application wanted to, it could use a FragmentAssembler to reconstruct the original messages, at the cost of copying each fragment into a reassembly buffer.