-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Cloud Pub/Sub has a maximum message size of around 10 MiB (source). gRPC has a default max message size of 4MiB, so there are valid messages that cannot be pulled by google-cloud-python.
These messages appear to be silently dropped, as the pull request generates <_Rendezvous of RPC that terminated with (StatusCode.RESOURCE_EXHAUSTED, Received message larger than max (8106187 vs. 4194304))> but this is considered to be a transient error so the request is retried. When the next call to Pull() returns no messages, the application receives no messages. (behaviour may be different with production Pub/Sub servers, as I encountered this testing against an emulator)
This limit was lifted for the BigTable client in #2907, but this change didn't affect other clients. For PubSub, it can be fixed by setting the max message size options (as done for BigTable) in make_gax_publisher_api / make_gax_subscriber_api.