GCP - Cloud Pub/SubWhich of the following is the correct way to create a Cloud Task with a scheduled delay in Google Cloud?AUse Pub/Sub with a delay attributeBUse Cloud Tasks client and set scheduleTime to future timestampCSend a message to Pub/Sub and rely on subscriber delayDCreate a Cloud Function with a timer trigger insteadCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify scheduling method in Cloud TasksCloud Tasks allows setting a scheduleTime property to delay task execution until a future timestamp.Step 2: Eliminate incorrect optionsPub/Sub does not support scheduling messages; Cloud Functions timer triggers are separate services.Final Answer:Use Cloud Tasks client and set scheduleTime to future timestamp -> Option BQuick Check:Scheduled tasks = Cloud Tasks scheduleTime [OK]Quick Trick: Schedule tasks with Cloud Tasks scheduleTime, not Pub/Sub [OK]Common Mistakes:Trying to delay Pub/Sub messages directlyConfusing Cloud Functions timers with Cloud Tasks schedulingAssuming subscribers can delay message processing
Master "Cloud Pub/Sub" in GCP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More GCP Quizzes Cloud Firestore and Bigtable - Bigtable for time-series data - Quiz 1easy Cloud Firestore and Bigtable - Firestore collections and documents - Quiz 3easy Cloud Functions - Environment variables and secrets - Quiz 5medium Cloud IAM Advanced - VPC Service Controls - Quiz 10hard Cloud IAM Advanced - IAM deny policies - Quiz 2easy Cloud Load Balancing - Why load balancing matters - Quiz 10hard Cloud Load Balancing - Why load balancing matters - Quiz 1easy Cloud Monitoring and Logging - Metrics and dashboards - Quiz 11easy Cloud Pub/Sub - Pull vs push subscriptions - Quiz 13medium Cloud Run - Custom domains - Quiz 2easy