GCP · Application Integration
Pub/Sub
Global async messaging.
Official docsOverview
Pub/Sub provides at-least-once delivery, push & pull subscriptions, schemas and exactly-once delivery for streaming pipelines.
When to use it
- Decouple producers/consumers
- Event-driven test orchestration
Setup
- Enable Pub/Sub API.
- Create topic and subscription.
How to use
Publish
gcloud pubsub topics publish test-events --message='{"run":"123","status":"fail"}'Pull
gcloud pubsub subscriptions pull test-events-sub --auto-ackQA use cases
- Fan out a 'build green' event to nightly QA jobs, dashboards and Slack.
