google-cloud-rust
google-cloud-rust copied to clipboard
Improve Pubsub batch message size computation
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.