- What is Pub/Sub Lite? A separate but similar messaging service built for low cost. It offers zonal storage and requires you to pre-provision and manage storage and throughput capacity.
- What is per-message parallellism? Pub/Sub "leases" individual messages (not partitions) to subscriber clients, then keeps track of whether a given message has been successfully processed. By contrast, other horizontally scalable messaging systems use partitions for horizontal scaling.
- What is a topic? A named resource to which messages are sent by publishers.
- What is a subscription? A named resource representing the stream of messages from a single, specific topic, to be delivered to the subscribing application.
- What is a message? The combination of data and (optional) attributes that a publisher sends to a topic and is eventually delivered to subscribers.
- What is a message attribute? A key-value pair that a publisher can define for a message. For example, key iana.org/language_tag and value en could be added to messages to mark them as readable by an English-speaking subscriber.
- What is a publisher? An application that creates and sends messages to a topic(s).
- What is a subscriber? An application with a subscription to a topic(s) to receive messages from it.
- What is an acknowledgement? A signal sent by a subscriber to Pub/Sub after it has received a message successfully. Acked messages are removed from the subscription's message queue.
- What is push? What is pull? The two message delivery methods. A subscriber receives messages either by Pub/Sub pushing them to the subscriber's chosen endpoint, or by the subscriber pulling them from the service.
- What is the difference between Pub/Sub and Cloud Tasks? 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. Therefore, Pub/Sub gives publishers no control over the delivery of the messages save for the guarantee of delivery. In this way, Pub/Sub supports implicit invocation: a publisher implicitly causes the subscribers to execute by publishing an event. By contrast, Cloud Tasks is aimed at explicit invocation where the publisher retains full control of execution. In particular, a publisher specifies an endpoint where each message is to be delivered.
- Why would you use synchronous pull instead of asynchronous pull? The application logic might rely on a polling pattern to retrieve messages or require a precise cap on a number of messages retrieved by the client at any given time
- What are the benefits of asynchronous pull? Asynchronous pulling provides higher throughput in your application, by not requiring your application to block for new messages
Subscribing
- What is the ackDeadline? The subscriber has a configurable, limited amount of time to acknowledge the outstanding message. Once the deadline passes, the message is no longer considered outstanding, and Pub/Sub will attempt to redeliver the message.
- What is an outstanding message? A message is considered outstanding once it has been sent out for delivery and before a subscriber acknowledges it.
- What happens to messages created before the subscription? Only messages published to the topic after the subscription is created are available to subscriber applications.
- What happens when the ackDeadline passes? Once the deadline passes, the message is no longer considered outstanding, and Pub/Sub will attempt to redeliver the message.
- What is at-least-once delivery? Typically, Pub/Sub delivers each message once and in the order in which it was published. However, messages may sometimes be delivered out of order or more than once. In general, accommodating more-than-once delivery requires your subscriber to be idempotent when processing messages.
- What is the appropriate delivery mechanism for large volumes of messages? pull