google-cloud-rust icon indicating copy to clipboard operation
google-cloud-rust copied to clipboard

Improve Pubsub batch message size computation

Open PhongChuong opened this issue 1 month ago • 0 comments

Current implementation to compute the pubsub message size for batching byte threshold is an estimate at best. This is to avoid cloning the message when computing the message size with prost. I.e., msg.clone().to_proto().unwrap().encoded_len(). If we move on to use protobuf crate, then it may be possible to use compute_size to find the wire length.

PhongChuong avatar Dec 02 '25 18:12 PhongChuong