Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PubsubIO may exceed maximum payload size #19384

Closed
kennknowles opened this issue Jun 3, 2022 · 1 comment
Closed

PubsubIO may exceed maximum payload size #19384

kennknowles opened this issue Jun 3, 2022 · 1 comment

Comments

@kennknowles
Copy link
Member

In a batch job on Dataflow that reads payload and metadata from a Bigquery table and publishes them to PubsubIO, I sometimes experience errors:


com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
"message" : "Request
payload size exceeds the limit: 10485760 bytes.",


 

PubsubIO Javadoc says it will use the the global limit of 10 MiB by default but it seems that doesn't work in all circumstances. I'm handling relatively large records here, up to 600 KiB per message.

Adding


.withMaxBatchBytesSize(5242880)

after


PubsubIO.writeMessages().to(topic)

fixes this issue.

 

Imported from Jira BEAM-7107. Original Jira may contain additional context.
Reported by: MadEgg.

@Abacn
Copy link
Contributor

Abacn commented Jun 5, 2024

Possible root cause #19744

@Abacn Abacn closed this as completed Jun 5, 2024
@github-actions github-actions bot added this to the 2.57.0 Release milestone Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants