googleapis / googleapis/google-cloud-rust
Improve Pubsub batch message size computation
Open
api: pubsub
type: cleanup
- Dominant language
- Rust
- Stars
- 955
- Forks
- 144
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 279
Description
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](https://docs.rs/protobuf/latest/protobuf/trait.Message.html#tymethod.compute_size) to find the wire length.
Contributor guide
Assessment
This issue has not been assessed yet.