Search code examples
google-cloud-pubsub

What is the maximum limit of Google Pub/Sub Attributes value?


I'm trying to use Google Pub/Sub in my project. And I got error because it exceed the limit of attributes value.

Message: Client error: POST https://pubsub.googleapis.com/v1/projects/<project>/topics/<topic>:publish resulted in a 400 Bad Request response: { "error": { "code": 400, "message": "One of the attributes in the request has a value that is too long. The l (truncated...)

I read the documentation on https://cloud.google.com/pubsub/docs/ but couldn't find it.


Solution

  • The limits are specified in the Quotas sections of the documentation. An attribute key can be up to 256 bytes and an attribute value can be up to 1024 bytes.