yoklainterview sim

DevOps / Cloud Gcp Messaging Eventing Interview Questions

75 verified DevOps / Cloud Gcp Messaging Eventing interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Gcp Messaging EventingDifficulty 1
What is Google Cloud Pub/Sub primarily used for?
  • aServing static websites directly to end users
  • bAsynchronous messaging to decouple event producers from consumers
  • cRunning scheduled batch jobs on a fixed timer, with no messaging component involved at all
  • dStoring large binary objects like images and videos
Explanation:Pub/Sub is a managed asynchronous messaging service: publishers send messages to a topic, subscribers receive them independently, decoupling producers and consumers so each can scale and fail independently. a and d describe unrelated services (static hosting, object storage), and c describes scheduling, not messaging.
Gcp Messaging EventingDifficulty 1
What delivery guarantee does a standard Pub/Sub subscription provide by default?
  • aExactly-once delivery is the only mode Pub/Sub supports
  • bNo delivery guarantee at all — messages may be silently dropped with no retry or redelivery attempt
  • cAt-least-once delivery — a message may be redelivered but is not lost
  • dAt-most-once delivery — a message is delivered once or never
Explanation:Pub/Sub's default guarantee is at-least-once: a message stays available until acknowledged, and network/timeout issues can cause redelivery, but the message is never silently dropped. Exactly-once is a separately-enabled feature with additional constraints (a is wrong as a blanket claim), and Pub/Sub does not offer at-most-once or no-guarantee modes (b, d wrong).
Gcp Messaging EventingDifficulty 1
What is the main difference between a push subscription and a pull subscription in Pub/Sub?
  • aPush subscriptions have Pub/Sub deliver messages via HTTP to an endpoint; pull subscriptions have the consumer actively call an API to fetch messages
  • bPush subscriptions store messages permanently; pull subscriptions delete them after one hour
  • cPull subscriptions only work with Cloud Functions; push subscriptions only work with Compute Engine
  • dThere is no functional difference, only a naming convention in the console
Explanation:Push delivers messages to a configured HTTPS endpoint as soon as they arrive; pull requires the subscriber to call the Pub/Sub API to retrieve messages on its own schedule. Retention behavior (b) is unrelated to push/pull, and neither mode is restricted to a specific compute service (c is wrong).
Gcp Messaging EventingDifficulty 2
What does an ordering key on a Pub/Sub message guarantee?
  • aMessages with the same ordering key are delivered exactly once, unlike messages using other ordering keys
  • bMessages with the same ordering key are automatically batched into a single delivery
  • cMessages with the same ordering key are routed to a dedicated dead-letter topic
  • dMessages with the same ordering key are delivered to subscribers in the order they were published
Explanation:Ordering keys let Pub/Sub preserve publish order for messages sharing the same key, at the cost of some throughput within that key. It does not change the delivery guarantee to exactly-once (a), does not batch messages together (b), and has nothing to do with dead-letter routing (c).
Gcp Messaging EventingDifficulty 2
What is the purpose of a dead-letter topic configured on a Pub/Sub subscription?
  • aIt permanently deletes messages that fail processing to free up quota
  • bIt receives messages that fail delivery past a configured number of attempts, so they can be inspected separately
  • cIt automatically retries failed messages forever without ever giving up
  • dIt stores a backup copy of every message regardless of delivery success
Explanation:A dead-letter topic captures messages that exceed the configured maximum delivery attempts, isolating persistently failing messages for inspection instead of retrying them indefinitely or dropping them. It doesn't delete messages outright (a), doesn't retry forever (c), and only receives failed messages, not every message (d).
Gcp Messaging EventingDifficulty 2
By default, how long does Pub/Sub retain an unacknowledged message in a subscription?
  • aForever — unacknowledged messages are never removed automatically regardless of subscription settings
  • b10 seconds, matching the default acknowledgement deadline
  • cUp to 7 days by default, configurable up to a longer retention period
  • dExactly 1 hour, with no option to change this value
Explanation:Pub/Sub's default message retention for a subscription is 7 days, and this window is configurable. The acknowledgement deadline (b) is a much shorter, separate setting controlling how long a single delivery attempt has before redelivery, not overall retention; retention is not infinite (a) nor fixed at one hour (d).

Test yourself against the 3375-question DevOps / Cloud bank.

Start interview