1. vs PubSub
- Cloud Tasks and Pub/Sub may be used to implement message passing and asynchronous integration.
- The core difference between Pub/Sub and Cloud Tasks is the notion of implicit vs explicit invocation.
- Pub/Sub aims to decouple publishers of events and subscribers to those events.
- Publishers do not need to know anything about their subscribers.
- Pub/Sub gives publishers no control over the delivery of the messages save for the guarantee of delivery.
- Pub/Sub supports implicit invocation: a publisher implicitly causes the subscribers to execute by publishing an event.
- Cloud Tasks is aimed at explicit invocation where the publisher retains full control of execution.
- Publisher specifies an endpoint where each message is to be delivered.
- Cloud Tasks provides tools for queue and task management unavailable to Pub/Sub publishers, including:
- Scheduling specific delivery times
- Delivery rate controls
- Configurable retries
- Access and management of individual tasks in a queue
- Task/message creation deduplication