Introduction
Sometimes you want your app to react automatically when new messages arrive. Pub/Sub sends messages, and Cloud Functions run code when messages come in, so they work together to automate tasks without you watching.
When you want to process user uploads automatically after they are sent to a storage bucket.
When you need to trigger notifications or alerts based on events happening in your app.
When you want to decouple parts of your app so they communicate by sending messages instead of direct calls.
When you want to run small pieces of code in response to events without managing servers.
When you want to scale event processing automatically as message volume changes.