Pub/Sub Made Easy
Cloud Pub/Sub Overview - ep. 1
A ten-episode progression through topics, subscriptions, clients, endpoints, and replay
Ten 2019–2020 episodes follow a message from publication to independent subscription backlogs, delivery, acknowledgement, and replay. Examples compare push and pull consumers and connect them to serverless endpoints.
Google Cloud Tech 1 of 10
In this collection Browse 10 summaries 1 of 10
When an order service calls packaging, shipping, and notification services directly, each call depends on the receiving service being available. This episode uses a fictional cat-poster shop to show an alternative: publish an event to Pub/Sub and let each interested service receive it when ready.
Key points
- Asynchronous handoffs separate availability: Applications can exchange work without producer and consumer being available at the same time 00:00–01:03(opens in a new tab).
- Direct calls make changes spread across services: Adding a monitoring service requires changing the existing services to send it events. Testing packaging also requires stand-ins for the order, shipping, and notification services it depends on 01:03–03:11(opens in a new tab).
- Pub/Sub becomes the intermediary: Producers publish events without naming every downstream service, while consumers receive them through push or pull 03:11–05:16(opens in a new tab).
- New consumers need not change the producer: A monitoring service can subscribe to existing events, and independently recovering services can consume retained messages after an outage 05:16–06:19(opens in a new tab).
Full video: https://www.youtube.com/watch?v=cvu53CnZmGI(opens in a new tab)