Skip to content

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:

Message 3 Message 2 Message 1

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:

Fragment 4 Fragment 3 F2 Fragment 1

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:

DF4 PAD DF3 DF2 DATA Frame 1 End of Term

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):

Packet 3 Packet 2 Packet 1

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.

DF4 PAD DF3 DF2 DATA Frame 1

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:

Fragment 4 Fragment 3 F2 Fragment 1

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.