You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/dev/adr/0020-large-message-chunking.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ We will implement sdk-level message chunking as part of the Protocol layer to tr
20
20
"chunkIndex": 0,
21
21
"timeout" : "00:00:10",
22
22
"totalChunks": 5,
23
-
"checksum": "optional-message-hash"
23
+
"checksum": "message-hash"
24
24
}
25
25
```
26
26
- `messageId, chunkIndex, timeout` - present for every chunk; `totalChunks, checksum` - present only for the first chunk.
@@ -55,13 +55,13 @@ We will implement sdk-level message chunking as part of the Protocol layer to tr
55
55
56
56
### Implementation Considerations
57
57
- **Error Handling:**
58
-
- Chunk timeout mechanisms, fixed or sliding timeout window approaches can be used (see Chunk Timeout Mechanism Options in Appendix)
58
+
- Chunk timeout mechanisms(see Chunk Timeout Mechanism Options in the Appendix)
59
59
- Error propagation to application code
60
60
- **Performance Optimization:**
61
61
- Concurrent chunk transmission
62
62
- Efficient memory usage during reassembly
63
63
- **Security:**
64
-
- Validate message integrity across chunks and prevent chunk injection attacks (covered if checksumm implemented)
64
+
- Validate message integrity across chunks and prevent chunk injection attacks (see Checksum Algorithm Options for MQTT Message Chunking in the Appendix)
65
65
66
66
# Appendix
67
67
@@ -77,4 +77,24 @@ We will implement sdk-level message chunking as part of the Protocol layer to tr
77
77
- Reset the timeout each time a new chunk arrives
78
78
- Only expire the chunked message if there's a long gap between chunks
79
79
- **Pros**: Tolerates varying network conditions and delivery rates
80
-
- **Cons**: Could keep resources allocated for extended periods
80
+
- **Cons**: Could keep resources allocated for extended periods
81
+
82
+
## Checksum Algorithm Options for MQTT Message Chunking
83
+
84
+
1. MD5
85
+
- **Description**: 128-bit hash function
86
+
- **Pros**: Good performance, reasonable size (16 bytes), widely implemented
87
+
- **Cons**: No longer considered cryptographically secure
88
+
- **Best for**: Basic integrity verification without security requirements
0 commit comments