Switch from fixed packet size to varint
mdwaud opened this issue · 0 comments
mdwaud commented
Currently Sink uses packet_size: 2
since Erlang handles the encoding/decoding for us. This limits us to a maximum message size of 2^16 bytes, though, which is can be small for transmitting snapshots, large batch publishes, or NACK responses to batch publish. Also, for small publish messages it wastes a byte. Switching to a varint adds some complexity, but solves both cases.