Google Pub/Sub Channel Binding v0.1.0
The Google Cloud Pub/Sub channel binding v0.1.0
defines how an AsyncAPI channel maps to a Google Cloud Pub/Sub Topic
.
Overview
This binding object allows you to specify configuration for a Pub/Sub topic. Note that this version of the binding has a somewhat confusing structure that was improved in later versions.
Channel Properties
Property | Type | Required | Description |
---|---|---|---|
bindingVersion | string | No | Binding version (defaults to 0.1.0 ). |
topic | string | Yes | The name of the topic. |
labels | object | No | A map of key-value pairs for organizing resources. |
messageRetentionDuration | string | No | The minimum duration a message is retained. |
messageStoragePolicy | object | No | Policy for controlling where messages are stored. |
schemaSettings | object | Yes | Settings for a schema associated with the topic. |
schemaSettings
Object
Property | Type | Required | Description |
---|---|---|---|
encoding | string | Yes | The encoding of messages. Can be json or binary . |
name | string | Yes | The full resource name of the schema. |
Example
yaml
channels:
user-creation-events:
bindings:
googlepubsub:
bindingVersion: '0.1.0'
topic: 'user-created-topic'
schemaSettings:
encoding: 'json'
name: 'projects/my-gcp-project/schemas/UserCreatedEvent'
Changelog
Version 0.1.0
- Initial release.
- Note: This version included both
topic
andschemaSettings
at the same level, which was clarified inv0.2.0
. Thetopic
string should be the channeladdress
in modern usage.