THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- The attributes flag bit is used to keep the message size the same as before if no headers are used
- HeadersLength is a variable length encoded int saving bytes where headers are small in size/number
Code Block | ||
---|---|---|
| ||
MessageAndOffset => Offset MessageSize Message Offset => int64 MessageSize => int32 Message => Crc MagicByte Attributes Timestamp KeyLength Key HeadersLength Headers ValueLength Value Crc => int32 MagicByte => int8 <---------------------- Bump up magic byte to 2 Attributes => int8 <---------------------- Use Bit 4 as boolean flag for if headers present Timestamp => int64 KeyLength => int32 Key => bytes (optional) HeadersLength => variable int32 <------------------ NEW [optional] lengthsize of the byte[] of the serialized headers if headers (optional) Headers => bytes <--------------------------------- NEW [optional] serialized form of the headers Map<StringMap<int, String>byte[]> ValueLength => int32 Value => bytes |
...