Google PubSub component
Google PubSub is a service that makes it easier to pass messages between machines and collect data from IoT devices.
The component interacts with Google Pub-Sub API. The API is an asynchronous messaging service that decouples services that produce events from services that process events. Pub/Sub offers durable message storage and real-time message delivery with high availability and consistent performance at scale. Pub/Sub servers run in all Google Cloud regions around the world.
— Google PubSub Subscriber Guide
A named resource to which publishers send messages.
A named resource representing the stream of messages from a specific topic to be delivered to the subscribing application. Read the Subscriber guide documentation for more information.
The combination of data and, optionally, attributes that a publisher sends to a topic eventually delivers to subscribers.
- Message attribute
A key-value pair that a publisher can define for a message. For example, the key
iana.org/language_tagand the value
encould be added to messages to mark them as readable by an English-speaking subscriber.
|Google provides a JSON file that includes your private key. Be careful using the information.|
Follow the instructions use your credentials:
Copy and paste the private key.
Remove any line breakers (
\n) from your key.
Leave the two lines shown below as they are:
-----BEGIN PRIVATE KEY----- YOUR KEY HERE -----END PRIVATE KEY-----
PubSub component authentication works with Google IAM Service Accounts and two-legged OAuth. To authenticate your component, you need to create a new Service Account on the Service Accounts page of your project and download the JSON file with the private key.
You must have
private_key values on the component authentication page.
Read the Using JWT service tokens documentation for more information.
|The authentication mechanism requires access to the topics in your account to read and publish. Verifications will fail if your created service account has no read permission (to subscribe as a trigger function). Save the credential without verification and use it for publishing to the topics (as an action function).|
The Publish action retrieves the message body from a previous step and sends a message to a topic while remaining unaware of existing subscriptions.