hands-on lab

Deploy a Message Queuing Solution With Google Cloud Pub/Sub

Intermediate
Up to 1h
894
3.7/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Google Cloud Pub/Sub is a scalable, durable event ingestion and message delivery system that allows you to create an infrastructure whose responsibility is to handle message queues. Pub/Sub delivers low-latency, durable messaging by using two core components: topics and subscriptions. You can create a topic where messages will be sent to, and subscriptions attached to the topics. All messages sent to a specific topic will be delivered to all the subscriptions attached. All the components that get messages from a subscription are called subscribers. For more detailed info about what is Cloud Pub/Sub, you can refer to the official GCP guide.

In this lab, you will understand the core components of a Pub/Sub system, you will create a topic and attach a subscription to it, you will send a message to the topic, and you will create a batch job using Cloud Dataflow to import messages to your topic from a text file stored in a Cloud Storage bucket.

Learning Objectives 

Upon completion of this lab you will be able to:

  • Understand what topics and subscriptions are in Pub/Sub
  • Define a topic
  • Create a subscription and attach it to a topic
  • Run a Cloud Dataflow job to import messages from a Cloud Storage bucket.

Intended Audience

This lab is intended for:

  • Google Cloud Associate Cloud Engineer (ACE) certification candidates
  • Solutions architects who want to define and deploy a message delivery system
  • Individuals who want to understand how a message delivery system works

Prerequisites

This lab has no prerequisites.

 

Updates

January 29th, 2024 - Updated the instructions and screenshots to reflect the latest UI

September 28th, 2023 - Resolved dataflow job issue

September 6th, 2023 - Updated the instructions and screenshots to reflect the latest UI

July 26th, 2023 -  Addressed user ban issue and added warning

June 26th, 2023 - Updated screenshots and instructions to match the latest UI

October 13th, 2022 - Updated screenshots and instructions to match the latest UI

March 22nd, 2022 - Updated lab UI

April 14th, 2020 - Added a new lab step that lets the user create a Cloud Function triggered by the publish event to a Pub/Sub topic

 

Environment before

Environment after

About the author

Students
40,833
Labs
106
Courses
2
Learning paths
10

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics

Lab steps

Signing In to the Google Cloud Console
Understanding the Core Concepts of Cloud Pub/Sub
Creating the Pub/Sub Topic
Triggering a Cloud Functions From a Pub/Sub Topic
Creating the Pub/Sub Subscription
Publishing Messages to a Pub/Sub Topic
Import Messages From a Cloud Storage Text File