- Google Cloud Pub/Sub Official Overview: https://cloud.google.com/pubsub/docs/overview
- Pub/Sub Subscriber Guide (Streaming Pull): https://cloud.google.com/pubsub/docs/pull
- IAM Permissions for Pub/Sub: https://cloud.google.com/pubsub/docs/access-control
- Service Account Key JSON Format: https://cloud.google.com/iam/docs/creating-managing-service-account-keys
- Streaming Ingestion from Google Cloud Pub/Sub using subscription ID
- Secure Auth via Service Account JSON keys
- Auto-Ack mechanism with offset management handled by Pub/Sub
- High-Throughput Pull Model using native GCP APIs
- Automatic Scaling aligned with Condense pipeline performance
- Authentication: Condense uses a Service Account JSON file to authenticate with GCP.
- Subscription Connection: The connector connects to the specified Pub/Sub subscription.
- Message Ingestion: Messages are pulled continuously via the streaming pull API.
- Forwarding: Each message is published to a Kafka-native Condense topic in real-time.
- Pipeline Processing: Downstream Condense transforms or applications can process the events.
Field-by-Field Explanation
1. Title
Purpose: Used to track, audit, and manage this connector instance.
Example:
gcp-pubsub-ingestor, alert-stream-from-gcp
2. Subscription Name
Format:
projects/{project_id}/subscriptions/{subscription_name}
Only the subscription_name is needed.
Note: The subscription must already be created and accessible by the service account.
3. Project ID
Definition: The unique GCP project identifier (not the name).
Example:
A. zeliot-platform
B. iot-alerts-prod
Purpose: Used to scope API calls and locate the Pub/Sub subscription.
4. Service Account Key
Contents: Raw JSON key for a GCP Service Account with Pub/Sub Subscriber role.
How to obtain:
A. Go to IAM & Admin → Service Accounts
B. Create or select a service account
C. Grant Pub/Sub Subscriber permission
D. Generate a JSON key
Security Note: This credential must be securely stored. Never expose it in logs.
5. Topic (Input)
Definition: A Condense Kafka-native topic into which Pub/Sub messages will be published.
Example:
A. gcp-device-ingest
B. raw-alerts-from-pubsub
C. cloud-logs-stream
Sample Configuration Example
orderingKey and the subscription is set to enable message ordering. This connector does not expose ordering settings currently.
3. Load Management
A. Condense auto-manages pull threads and concurrency. For high-throughput topics, use multiple connector instances.
Best Practices
- Use Dedicated Service Accounts: Assign least-privilege IAM roles.
- Secure Key Management: Rotate keys regularly and store in secure vaults or environment secrets.
- Use Dead-Letter Topics in Pub/Sub: For resilient error handling in GCP.
- Benchmark with Real Load: Some latency may be observed with idle subscriptions.