Courseiva
mediumDrag & DropObjective-mapped

Google ACE Practice Question: Arrange the steps to create a Cloud Pub/Sub…

Arrange the steps to create a Cloud Pub/Sub topic, subscription, and publish a message.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

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

Create topic -> Create subscription -> Publish message -> Pull message

The correct sequence ensures the topic and subscription exist before any messages are published, and messages are retrieved only after they have been published. This order prevents errors and message loss in Google Cloud Pub/Sub.

Answer analysis

Option-by-option breakdown

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

  • Create topic -> Create subscription -> Publish message -> Pull message

    Why this is correct

    Creating the topic first is mandatory because a subscription must reference an existing topic at creation time. Then the subscription must be created before any messages are published, since Pub/Sub retains messages in the subscription backlog, not in the topic itself. Publishing after the subscription exists guarantees the message is added to that subscription's backlog and can be pulled. Finally, the subscriber pulls the message from the subscription, completing the correct end-to-end flow.

  • Create subscription -> Create topic -> Publish message -> Pull message

    Why it's wrong here

    This order is invalid because a subscription cannot be created without a pre-existing topic; the Pub/Sub API returns an error (NOT_FOUND) if the referenced topic does not exist. Even if the subscription creation somehow succeeded, it would have no associated topic to receive messages from, making the subsequent publish and pull steps meaningless. The topic must always be the first resource created in the Pub/Sub hierarchy.

  • Create topic -> Publish message -> Create subscription -> Pull message

    Why it's wrong here

    Publishing a message before creating the subscription is a common mistake that causes message loss. In Pub/Sub, messages are not stored in the topic; they are stored in the subscription's backlog, and a subscription only receives messages published after it has been created. Therefore, a message published before subscription creation will never appear in that subscription, regardless of its retention window. The subscription must exist at the moment of publish so the message can be attached to its backlog.

  • Create topic -> Create subscription -> Pull message -> Publish message

    Why it's wrong here

    Pulling before publishing is logically futile because there are no messages in the subscription's backlog to retrieve. Even though pull operations can be long-lived and wait for messages, the publish step in this sequence occurs after the pull, so the subscriber would simply receive an empty response or time out. The correct workflow requires the message to be published first, then the subscriber pulls the newly available message.

About these practice questions

This ACE question is part of Courseiva's 769-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 ACE 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 ACE exam.