René's URL Explorer Experiment


Title: Request batching does not track encoding overhead accurately · Issue #2106 · googleapis/java-pubsub · GitHub

Open Graph Title: Request batching does not track encoding overhead accurately · Issue #2106 · googleapis/java-pubsub

X Title: Request batching does not track encoding overhead accurately · Issue #2106 · googleapis/java-pubsub

Description: Steps to reproduce Set the byte size per batched request to >9.1 MB. Construct a batch of sufficiently large messages while respecting limits per message (max 10 MB data + attributes + ordering key, max 100 attributes, max 256 B per attr...

Open Graph Description: Steps to reproduce Set the byte size per batched request to >9.1 MB. Construct a batch of sufficiently large messages while respecting limits per message (max 10 MB data + attributes + ordering key...

X Description: Steps to reproduce Set the byte size per batched request to >9.1 MB. Construct a batch of sufficiently large messages while respecting limits per message (max 10 MB data + attributes + ordering ...

Opengraph URL: https://github.com/googleapis/java-pubsub/issues/2106

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Request batching does not track encoding overhead accurately","articleBody":"#### Steps to reproduce\r\n\r\n  1. Set the byte size per batched request to \u003e9.1 MB.\r\n  2. Construct a batch of sufficiently large messages while respecting limits per message (max 10 MB data + attributes + ordering key, max 100 attributes, max 256 B per attribute key, max 1024 B per attribute value, max 1024 B per ordering key) to exceed either the serialized size limit of 10 MB per `PublishRequest` or 10 MiB request size limit per call to publish (pointless because of the first limit unless explicit size validation is enabled).\r\n  3. Publish the batch.\r\n  4. Observe thrown exception, either an early rejection (\u003e10 MiB) or an internal error (\u003e10 MB, \u003c10 MiB) on request_size if explicit size validation isn't enabled for the topic.\r\n\r\n#### External references such as API reference guides\r\n\r\nThe API reference does not provide adequate documentation on these limits, since it suggests that explicit size validation is used. \r\n\r\n#### Any additional information below\r\n\r\nDiscovered this while reviewing size validation in `PubsubIO` for Apache Beam, see apache/beam#31800 for details.\r\nHappy to open a PR with fixes when I get a chance, just wanted to highlight this ahead of time for discussion.\r\n\r\nThis shouldn't be an issue if a user recovers by lowering the byte size per batch (\u003c9 MB is generally safe with current limits per message), but the client library should track the outgoing request size accurately on the user's behalf in my opinion.\r\n\r\nAlso note that allowing users to use the REST API for Pub/Sub as proposed in #2075 would complicate matters since the serialized size of publish requests sent as JSON can be smaller than the serialized size of the same requests after it's transcoded into protobuf. For this message type a protobuf message can be up to ~38 KB smaller or up to ~0.9 MB larger than its JSON counterpart.\r\nAn example of this would be a JSON publish request of 736 messages, each message with no data and 100 attributes, each attribute with no value and a key of 128 alphanumeric ASCII characters. The JSON request does not exceed 10 MB, but the protobuf transcoded request that's passed to Pub/Sub exceeds it by ~145 KB. That triggers the internal validation error without explicit size validation, but I guess this will become a non-issue when explicit size validation is used by default.","author":{"url":"https://github.com/sjvanrossum","@type":"Person","name":"sjvanrossum"},"datePublished":"2024-07-08T16:44:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/2106/java-pubsub/issues/2106"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b8858a82-c275-6040-9a8c-78c7595984ce
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE3EC:4D0D3:2877EAF:33A4FC1:6991B558
html-safe-nonce8636b2dff204ea8ef77d3689444532ed6e4de10d0c760d0576613bf9da171dd2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0VDOjREMEQzOjI4NzdFQUY6MzNBNEZDMTo2OTkxQjU1OCIsInZpc2l0b3JfaWQiOiI3NTIzNzU2MTY4NTI0NzA3MTYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdb521c4cc8daa8b38906d3c9828a77c6e796c6b65f86bc634cb6fbbe9d43413e
hovercard-subject-tagissue:2396096985
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/java-pubsub/2106/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fa1d94b7e4fe72fdceb03cdb9362aeed68a145dbb120c0feb0c9d9ee45790dab/googleapis/java-pubsub/issues/2106
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fa1d94b7e4fe72fdceb03cdb9362aeed68a145dbb120c0feb0c9d9ee45790dab/googleapis/java-pubsub/issues/2106
og:image:altSteps to reproduce Set the byte size per batched request to >9.1 MB. Construct a batch of sufficiently large messages while respecting limits per message (max 10 MB data + attributes + ordering key...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesjvanrossum
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
go-importgithub.com/googleapis/java-pubsub git https://github.com/googleapis/java-pubsub.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id203461480
octolytics-dimension-repository_nwogoogleapis/java-pubsub
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id203461480
octolytics-dimension-repository_network_root_nwogoogleapis/java-pubsub
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release848bc6032dcc93a9a7301dcc3f379a72ba13b96e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/googleapis/java-pubsub/issues/2106#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fjava-pubsub%2Fissues%2F2106
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fjava-pubsub%2Fissues%2F2106
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fjava-pubsub
Reloadhttps://patch-diff.githubusercontent.com/googleapis/java-pubsub/issues/2106
Reloadhttps://patch-diff.githubusercontent.com/googleapis/java-pubsub/issues/2106
Reloadhttps://patch-diff.githubusercontent.com/googleapis/java-pubsub/issues/2106
googleapis https://patch-diff.githubusercontent.com/googleapis
java-pubsubhttps://patch-diff.githubusercontent.com/googleapis/java-pubsub
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fgoogleapis%2Fjava-pubsub
Fork 101 https://patch-diff.githubusercontent.com/login?return_to=%2Fgoogleapis%2Fjava-pubsub
Star 147 https://patch-diff.githubusercontent.com/login?return_to=%2Fgoogleapis%2Fjava-pubsub
Code https://patch-diff.githubusercontent.com/googleapis/java-pubsub
Issues 17 https://patch-diff.githubusercontent.com/googleapis/java-pubsub/issues
Pull requests 26 https://patch-diff.githubusercontent.com/googleapis/java-pubsub/pulls
Actions https://patch-diff.githubusercontent.com/googleapis/java-pubsub/actions
Security 0 https://patch-diff.githubusercontent.com/googleapis/java-pubsub/security
Insights https://patch-diff.githubusercontent.com/googleapis/java-pubsub/pulse
Code https://patch-diff.githubusercontent.com/googleapis/java-pubsub
Issues https://patch-diff.githubusercontent.com/googleapis/java-pubsub/issues
Pull requests https://patch-diff.githubusercontent.com/googleapis/java-pubsub/pulls
Actions https://patch-diff.githubusercontent.com/googleapis/java-pubsub/actions
Security https://patch-diff.githubusercontent.com/googleapis/java-pubsub/security
Insights https://patch-diff.githubusercontent.com/googleapis/java-pubsub/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/googleapis/java-pubsub/issues/2106
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/googleapis/java-pubsub/issues/2106
#2113https://github.com/googleapis/java-pubsub/pull/2113
Request batching does not track encoding overhead accuratelyhttps://patch-diff.githubusercontent.com/googleapis/java-pubsub/issues/2106#top
#2113https://github.com/googleapis/java-pubsub/pull/2113
https://patch-diff.githubusercontent.com/michaelpri10
api: pubsubIssues related to the googleapis/java-pubsub API.https://github.com/googleapis/java-pubsub/issues?q=state%3Aopen%20label%3A%22api%3A%20pubsub%22
https://github.com/sjvanrossum
https://github.com/sjvanrossum
sjvanrossumhttps://github.com/sjvanrossum
on Jul 8, 2024https://github.com/googleapis/java-pubsub/issues/2106#issue-2396096985
apache/beam#31800https://github.com/apache/beam/issues/31800
#2075https://github.com/googleapis/java-pubsub/pull/2075
michaelpri10https://patch-diff.githubusercontent.com/michaelpri10
api: pubsubIssues related to the googleapis/java-pubsub API.https://github.com/googleapis/java-pubsub/issues?q=state%3Aopen%20label%3A%22api%3A%20pubsub%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.