You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 04:01:06 UTC

[GitHub] [beam] kennknowles opened a new issue, #19573: PubsubIO (Java) write batch size can exceed request payload limit

kennknowles opened a new issue, #19573:
URL: https://github.com/apache/beam/issues/19573

   In some (probably rare) cases PubsubIO write (in Batch mode) batch size can exceed request payload limit of 10mb. PubsubIO ensures that batch size is less than limit (10mb by default). But then PubsubJsonClient is used that converts message payloads into URL-Safe Base64 encoding which can inflate message size (in my case for json strings it was up to 25-30%). As result we get 400 response (with 'Request payload size exceeds the limit: 10485760 bytes' message), even though original batch had correct size.
   Obvious workaround is to reduce batch size (`PubsubIO.writeMessages().to(...).withMaxBatchBytesSize(... i.e. 5mb ...)`), but it is a bit annoying.
   
   Imported from Jira [BEAM-7883](https://issues.apache.org/jira/browse/BEAM-7883). Original Jira may contain additional context.
   Reported by: yura.ata.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org