Validate schemas

Stay organized with collections Save and categorize content based on your preferences.

Topics may use schemas to define a format that their messages must follow. When subscribing to a topic with a schema, the messages sent to the subscriber are guaranteed to be valid messages of the type and encoding specified in the topic's schema settings. The subscriber can determine the schema settings associated with a topic by looking at two attributes:

  • googclient_schemaname: The name of the schema used for validation. If the schema has been deleted, the name is _deleted-schema_
  • googclient_schemaencoding: The encoding of the message, either JSON on BINARY

To learn more about schemas, see Create and manage schemas.