This feature allows the chunking of MQTT payloads published between AAM and Edge nodes.
How to use
In the web GUI, go to “App Manager” in the top bar.
Then, right click on the node and select “Properties”.
In the “General” tab, check the “Chunk MQTT Payload” option and save the changes. You can change the max chunk size with the “Max chunk size in KB” option. Enabling the “Compress MQTT Payload” option will also compress the chunked payloads.
To enable payload chunking between AAM and an Edge node, only one of the devices needs to have chunking enabled, either AAM or the Edge node. So enabling chunking for AAM would enable chunking between AAM and all of its nodes that are able to chunk payloads.
How does it work
Chunked payloads are published to asiManager/chunked/<nodeId>
, where nodeId
can be a UUID of an Edge node or the literal manager
to denote AAM.
The chunked payload itself is a JSON blob with the following shape:
{ "topic": string, // The actual topic of the chunked MQTT message "chunk": string, // Base64 encoded byte string chunk of MQTT payload "part": integer, // The order of the chunk in a sequence "out_hash": string, // MD5 hash of the completed payload, is only sent with the last chunk to denote that the sender is finished sending chunks "id": string // ID of the MQTT message as a UUID }
When enabled, the payload chunking is initiated when receiving a flag inside of an unchunked MQTT payload JSON. As a result, the first message in an exchange will always be unchunked even when payload chunking is enabled. This is for backwards compatible reasons, as it is not possible for the sender to know ahead of time 100% of the time whether the receiver can accepted chunked payloads. In future App Manager versions, this constraint can be removed when backwards compatibility for older versions is dropped.
An example of an exchange of MQTT payloads would be the sync process, where a series of MQTT messages are sent back and forth between AAM and an Edge node to complete the sync process. The first message that initiates the sync process will be unchunked, and subsequent messages in the sync process will be chunked if enabled.