Skip to content

Google Pub/Sub Message Binding v0.1.0 ​

The Google Cloud Pub/Sub message binding v0.1.0 defines message-specific properties for the Google Cloud Pub/Sub protocol.

Overview ​

This binding object allows you to specify an orderingKey, a map of attributes, and an optional schema definition.

Message Properties ​

PropertyTypeRequiredDescription
bindingVersionstringNoBinding version (defaults to 0.1.0).
attributesobjectNoA map of key-value pairs for metadata.
orderingKeystringNoA key that ensures messages with the same key are delivered in order.
schemaobjectNoA schema that the message payload should validate against.

schema Object ​

PropertyTypeRequiredDescription
namestringYesThe full resource name of the schema.
typestringYesThe type of the schema (e.g., avro, protobuf).

Example ​

yaml
messages:
  userLocationUpdate:
    bindings:
      googlepubsub:
        bindingVersion: '0.1.0'
        orderingKey: 'userId'
        schema:
          type: 'avro'
          name: 'projects/my-gcp-project/schemas/UserLocation'

Changelog ​

Version 0.1.0 ​

  • Initial release.
  • The schema object required a type field, which was removed in v0.2.0 as it was redundant with the schema definition in GCP.