Courseiva
easyMultiple Choice

PDE Practice Question: Refer to the exhibit

Exhibit

gcloud pubsub topics get-iam-policy my-topic
Bindings:
- members:
  - serviceAccount:sa@project.iam.gserviceaccount.com
  role: roles/pubsub.subscriber

Refer to the exhibit. A subscriber is unable to pull messages from the topic. What is the most likely cause?

⚠ Common exam trap

Google Cloud often tests the distinction between topics and subscriptions, trapping candidates who assume that having a topic and a subscriber role is sufficient to receive messages, when in fact a subscription must be explicitly created.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

No subscription has been created for the topic.

In Google Cloud Pub/Sub, a topic is a named resource to which messages are sent by publishers. Subscribers must create a subscription (pull or push) to receive messages from that topic. If no subscription exists, the subscriber cannot pull any messages because there is no delivery endpoint or pull queue attached to the topic. Option C correctly identifies this missing subscription as the root cause.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The service account has the subscriber role but the topic is not configured correctly.

    Why it's wrong here

    Holding the subscriber role already authorises pulling, so an unspecified topic misconfiguration is not the demonstrable cause shown in the exhibit. It is tempting because subscription or topic settings can block delivery, but the exhibit points to a missing subscriber binding rather than configuration.

  • ✗

    The service account needs roles/pubsub.viewer to list subscriptions.

    Why it's wrong here

    Listing subscriptions is a control-plane operation; pulling messages requires roles/pubsub.subscriber on the subscription itself, so viewer cannot authorise the pull. It is tempting because viewer grants read access to subscription metadata, which would suffice for inspecting configuration rather than consuming messages.

  • ✓

    No subscription has been created for the topic.

    Why this is correct

    Pub/Sub delivers messages only through subscriptions; a topic without any subscription retains messages but has no consumer to pull them. The subscriber's pull fails because no subscription exists to bind the topic to a receiving endpoint.

  • ✗

    The service account lacks roles/pubsub.publisher.

    Why it's wrong here

    Publishing permission governs writing messages to a topic, not reading them from a subscription, so its absence cannot block a pull. It is tempting because the symptom concerns a topic, yet the failing operation is consumption, which requires roles/pubsub.subscriber on the subscription.

About these practice questions

This PDE question is part of Courseiva's 747-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.