▸case-03 Write Python code using google-cloud-pubsub to set up a subscriber client for subscription 'projects/my-project/subscriptions/worker-sub'. Developers often instantiate the subscriber without limits, causing high-volume bursts to overflow memory. Set flow control limits to maximum 100 outstanding messages and 100 MB outstanding bytes. | pass→pass | 11,878 | 13,439 | +13% | 1 | 1 | 0% | 1,430 | 2,162 | +51% | 0 | 0 | — |
▸case-01 Write a Terraform configuration block for a Google Cloud Pub/Sub subscription named 'order-events-sub' attached to topic 'order-events-topic'. Unprocessed messages after 5 delivery attempts should be routed to a dead-letter topic 'order-events-dlq'. Standard practice might be to rely on default retries indefinitely, but we require an explicit dead-letter block. | pass→pass | 13,366 | 12,292 | -8% | 1 | 1 | 0% | 1,747 | 1,829 | +5% | 0 | 0 | — |
▸case-02 Provide the gcloud CLI command to create a push Pub/Sub subscription named 'audit-push-sub' for topic 'audit-events'. The push endpoint is 'https://example.com/api/events'. Many tutorials omit push authentication and create unauthenticated push subscriptions, but this endpoint requires OIDC tokens issued under service account 'push-invoker@my-project.iam.gserviceaccount.com'. | pass→pass | 10,614 | 11,287 | +6% | 1 | 1 | 0% | 1,147 | 1,697 | +48% | 0 | 0 | — |
▸case-04 Provide a Terraform snippet for a Pub/Sub subscription named 'core-service-sub'. GCP default behavior automatically deletes subscriptions after 31 days of inactivity, which causes unexpected production outages when traffic pauses. Configure the subscription expiration policy so that it never expires. | pass→pass | 9,191 | 10,798 | +17% | 1 | 1 | 0% | 870 | 1,429 | +64% | 0 | 0 | — |
▸case-05 Write a Terraform resource or gcloud command to create a GCP Pub/Sub subscription named 'report-generator-sub' for topic 'reports'. The processing worker takes up to 45 seconds to finish processing each message. Default subscription ack deadline is 10 seconds, which causes duplicate deliveries before processing completes. Set an ack deadline of 60 seconds. | pass→pass | 9,638 | 10,830 | +12% | 1 | 1 | 0% | 854 | 1,419 | +66% | 0 | 0 | — |
▸case-06 Create a Terraform google_pubsub_subscription resource for 'retryable-jobs-sub' attached to 'jobs-topic'. When downstream services fail, developers often default to immediate retries. Configure a retry policy with a minimum backoff of 10 seconds and a maximum backoff of 600 seconds. | pass→pass | 10,045 | 11,681 | +16% | 1 | 1 | 0% | 920 | 1,675 | +82% | 0 | 0 | — |
▸case-07 Define a Terraform google_pubsub_subscription resource that writes incoming Pub/Sub messages directly into BigQuery table 'my-project:analytics.events_raw' without needing Dataflow or Cloud Functions. The architecture should write metadata columns as well. | pass→pass | 20,120 | 14,477 | -28% | 1 | 1 | 0% | 3,155 | 2,288 | -27% | 0 | 0 | — |
▸case-08 Provide a Terraform resource definition for exporting Pub/Sub messages directly into a Google Cloud Storage bucket 'my-bucket-logs'. Message data should be formatted with output prefix 'logs/' and file extension '.json'. | pass→pass | 14,773 | 14,297 | -3% | 1 | 1 | 0% | 1,942 | 2,155 | +11% | 0 | 0 | — |
▸case-09 Provide the gcloud command to create a Pub/Sub subscription 'high-priority-sub' on topic 'all-orders'. Rather than fetching all messages and filtering in application code, filter messages on the GCP infrastructure side so the subscription only receives messages where attribute 'priority' equals 'high'. | pass→pass | 8,528 | 8,673 | +2% | 1 | 1 | 0% | 675 | 1,051 | +56% | 0 | 0 | — |
▸case-10 Write a Terraform block for Pub/Sub subscription 'replayable-sub' that retains unacknowledged messages for 7 days so that consumer outages can recover missing data. Default retention is often assumed sufficient, but explicitly set message retention duration to 7 days. | pass→pass | 10,637 | 12,572 | +18% | 1 | 1 | 0% | 1,097 | 1,796 | +64% | 0 | 0 | — |
▸case-11 Provide a Terraform google_pubsub_subscription configuration named 'audit-log-sub' where acknowledged messages are retained after ack so that ops teams can seek back to an earlier timestamp using Pub/Sub snapshots. | pass→pass | 11,504 | 12,377 | +8% | 1 | 1 | 0% | 1,213 | 1,816 | +50% | 0 | 0 | — |
▸case-12 Define a Terraform google_pubsub_subscription for 'payment-processing-sub'. Default Pub/Sub delivery guarantee is at-least-once, which can result in duplicate payments if a network split occurs during acknowledgment. Enable exact-once delivery on this subscription. | fail→pass | 9,167 | 12,588 | +37% | 1 | 1 | 0% | 776 | 1,780 | +129% | 0 | 0 | — |
▸case-13 Write the gcloud command to create subscription 'ordered-shipments-sub' on topic 'shipment-updates'. The publisher attaches ordering keys, but unless subscription-side ordering is turned on, messages arrive out of sequence. Enable message ordering on the subscription. | pass→pass | 7,294 | 9,008 | +23% | 1 | 1 | 0% | 395 | 1,051 | +166% | 0 | 0 | — |
▸case-14 Describe or write the Terraform GCP IAM bindings needed for a Pub/Sub subscription dead-lettering setup where subscription 'sub-a' forwards failed messages to dead-letter topic 'topic-dlq'. The application service account already has subscriber access. What permission does the GCP Pub/Sub system service agent itself need on the dead-letter topic? | pass→pass | 21,452 | 16,513 | -23% | 1 | 1 | 0% | 3,170 | 2,834 | -11% | 0 | 0 | — |
▸case-15 When setting up dead-lettering on Pub/Sub subscription 'order-sub' with dead-letter topic 'order-dlq', the GCP service agent needs permission to acknowledge messages on 'order-sub' so they can be evicted. Which IAM role must be granted to the Pub/Sub service agent on 'order-sub'? | pass→pass | 10,438 | 11,201 | +7% | 1 | 1 | 0% | 1,033 | 1,629 | +58% | 0 | 0 | — |
▸case-16 Specify the exact Cloud Monitoring metric name used to build an alerting policy for accumulated unacknowledged messages on a GCP Pub/Sub subscription. Developers often search for generic CPU metrics or queue metrics. | pass→pass | 10,822 | 9,077 | -16% | 1 | 1 | 0% | 996 | 1,172 | +18% | 0 | 0 | — |
▸case-17 Write a gcloud pubsub subscriptions create command named 'bq-ingest-sub' for topic 'telemetry' that streams directly into BigQuery table 'project1:dataset1.telemetry_table' without intermediate code. | pass→pass | 8,845 | 10,465 | +18% | 1 | 1 | 0% | 754 | 1,363 | +81% | 0 | 0 | — |
▸case-18 In Python using google-cloud-pubsub, when a message handler starts a long-running batch job on a received message, how should the code prevent Pub/Sub from re-delivering the message before processing completes? | fail→fail | 23,071 | 23,706 | +3% | 1 | 1 | 0% | 3,172 | 3,505 | +10% | 0 | 0 | — |
▸case-19 Write a Terraform `google_pubsub_subscription` block for push subscription 'webhook-sub' targeting endpoint 'https://api.internal.net/push'. Configure push authentication using service account email 'sa-pusher@myproj.iam.gserviceaccount.com' and audience 'https://api.internal.net'. | pass→pass | 9,536 | 10,913 | +14% | 1 | 1 | 0% | 1,023 | 1,550 | +52% | 0 | 0 | — |
▸case-20 Write a Terraform configuration block to create a GCP Pub/Sub topic named 'user-signup-topic' configured with an Avro schema definition 'projects/my-project/schemas/user-schema' and JSON encoding format. Do not create a subscription. | pass→pass | 8,299 | 7,971 | -4% | 1 | 1 | 0% | 647 | 970 | +50% | 0 | 0 | — |
▸case-21 Write a Terraform resource block for a GCP Cloud Tasks queue named 'email-dispatch-queue'. Configure rate limits with max_dispatches_per_second set to 500 and max_concurrent_dispatches set to 50. | pass→pass | 9,604 | 8,515 | -11% | 1 | 1 | 0% | 866 | 1,037 | +20% | 0 | 0 | — |
▸case-22 Write a Terraform configuration granting the Pub/Sub Publisher role on topic 'projects/my-project/topics/data-feed' to service account 'ingestor@my-project.iam.gserviceaccount.com'. This is topic-level publisher IAM, not subscription setup. | pass→pass | 10,339 | 12,882 | +25% | 1 | 1 | 0% | 1,011 | 2,009 | +99% | 0 | 0 | — |