Here are two annotated screenshots of a subscribe and a publish message.
|You can see the message header, consisting of the message length (0x18 = 24) and opcode. The message content consists of one (length, value) pair for the client identifier and the channel name to subscribe to.|
|The publish type has two (length, value) pairs - the client identifier and the channel name (both being 9 bytes in this example). The rest of the message then is the payload itself, the message published. The overall message length is 0x158 = 344 bytes.|