Actions4
- Messages Actions
- Topic Subscriptions Actions
Overview
This node integrates with Google Cloud Pub/Sub to perform operations related to messages and topic subscriptions. Specifically, the 'Streaming Pull' operation under the 'Messages' resource allows users to receive messages from a Pub/Sub subscription in a streaming manner. It listens for incoming messages up to a specified maximum count or until a timeout occurs, optionally acknowledges the messages, and can decode message data from JSON format. This is useful for real-time message processing scenarios, such as event-driven workflows, monitoring systems, or data pipelines that require continuous message consumption from Pub/Sub.
Use Case Examples
- A user wants to continuously receive up to 100 messages from a specific Pub/Sub subscription, process them in real-time, and acknowledge them automatically to prevent re-delivery.
- A workflow needs to pull messages from a subscription for up to 60 seconds, decode the JSON payloads automatically, and then pass the data downstream for further processing.
Properties
| Name | Meaning |
|---|---|
| Project ID | Google Cloud project id where the Pub/Sub subscription exists. |
| Subscription | Name of the Google Pub/Sub subscription to pull messages from. |
| Maximum Messages | Maximum number of messages to pull in one streaming session. |
| Timeout | Timeout in seconds after which the streaming pull stops and returns the collected messages. |
| Acknowledge Messages | Whether to automatically acknowledge the received messages to prevent re-delivery. |
| Decode JSON | If enabled, automatically decode the message data from JSON format. |
Output
JSON
receivedMessages- Array of received messages, each containing id, data, attributes, and ackId.count- Count of messages received during the streaming pull.
Dependencies
- Google Cloud Pub/Sub API
- Google Auth Library for authentication
Troubleshooting
- Ensure valid Google API credentials are provided; missing credentials will cause errors.
- Subscription name must be correct and accessible within the specified project.
- Timeout and maximum messages parameters should be set appropriately to avoid premature termination or excessive waiting.
- If JSON decoding is enabled, ensure message data is valid JSON to avoid parsing errors.
Links
- Google Cloud Pub/Sub Pull Documentation - Official documentation on pulling messages from Pub/Sub subscriptions.
- Google Cloud Pub/Sub Client Libraries - Information about client libraries used for Pub/Sub integration.
