googleapis / googleapis/google-cloud-rust

Improve Pubsub batch message size computation

Open
#3,963 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.