Google Professional Cloud Developer Practice Test 70
Question 690
A subscriber performs a slow API call and receives the same Pub/Sub message again after the acknowledgement deadline expires. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling.
- Use ordering keys for related messages requiring ordered delivery, without imposing a global queue on unrelated entities.
- Acknowledge only after durable processing and make the handler idempotent to expected redelivery.
- Use Workflows to coordinate the required service calls with explicit conditionals and error handling.
Explanation
Correct Answer
C:Acknowledge only after durable processing and make the handler idempotent to expected redelivery. Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. Before rollout, inspect acknowledgment timing, lease extension, processing transaction order, and repeated message IDs.
Incorrect Answers
A:Use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling. For this case, Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. A more direct response is to recognize that acknowledge only after durable processing and make the handler idempotent to expected redelivery.
B:Use ordering keys for related messages requiring ordered delivery, without imposing a global queue on unrelated entities. For this case, Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. A more direct response is to recognize that acknowledge only after durable processing and make the handler idempotent to expected redelivery.
D:Use Workflows to coordinate the required service calls with explicit conditionals and error handling. This design addresses Workflows multi-step service orchestration, where Workflows coordinates multi-step application processes; simply placing independent messages on topics does not create a deterministic state machine. A more direct response is to recognize that acknowledge only after durable processing and make the handler idempotent to expected redelivery.
Question 691
A subscriber performs a slow API call and receives the same Pub/Sub message again after the acknowledgement deadline expires. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Generate a short-lived URL for the intended object and test operation and expiry enforcement.
- Use supported client deadline-extension behavior and a stable operation identifier around the database update.
- Publish test updates with consistent per-entity keys and verify consumer ordering while independent keys process concurrently.
- Configure and test a poison message, including correct permissions for dead-letter forwarding and monitoring.
Explanation
Correct Answer
B:Use supported client deadline-extension behavior and a stable operation identifier around the database update. Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. Validate the change by checking that messages eventually complete once at the business level even when delivery retries are observed.
Incorrect Answers
A:Generate a short-lived URL for the intended object and test operation and expiry enforcement. This action changes a different concern, Cloud Storage signed upload/download workflows. The case instead calls for the following: use supported client deadline-extension behavior and a stable operation identifier around the database update.
C:Publish test updates with consistent per-entity keys and verify consumer ordering while independent keys process concurrently. This action changes a different concern, Pub/Sub ordering keys and partitioned work. The case instead calls for the following: use supported client deadline-extension behavior and a stable operation identifier around the database update.
D:Configure and test a poison message, including correct permissions for dead-letter forwarding and monitoring. This action changes a different concern, Pub/Sub dead-letter handling. The case instead calls for the following: use supported client deadline-extension behavior and a stable operation identifier around the database update.
Question 692
A subscriber performs a slow API call and receives the same Pub/Sub message again after the acknowledgement deadline expires. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The reconciliation triggers on the expected business schedule without duplicate side effects across instances.
- The application reaches the intended API in the correct project without granting broad unrelated roles.
- Messages eventually complete once at the business level even when delivery retries are observed.
- The client retrieves every authorized record without assuming a first page is a complete result set.
Explanation
Correct Answer
C:Messages eventually complete once at the business level even when delivery retries are observed. Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. The original diagnosis should have included this step: inspect acknowledgment timing, lease extension, processing transaction order, and repeated message IDs.
Incorrect Answers
A:The reconciliation triggers on the expected business schedule without duplicate side effects across instances. That result could support testing of Cloud Scheduler recurring trigger design: Cloud Scheduler supplies scheduled triggers; exactly-once business execution still requires receiver-level idempotency. It cannot substitute for the required control: messages eventually complete once at the business level even when delivery retries are observed.
B:The application reaches the intended API in the correct project without granting broad unrelated roles. That result could support testing of google Cloud API enablement and service identity: Service enablement and IAM authorization are separate prerequisites for Google Cloud API calls; one does not substitute for the other. It cannot substitute for the required control: messages eventually complete once at the business level even when delivery retries are observed.
D:The client retrieves every authorized record without assuming a first page is a complete result set. That result could support testing of Cloud API pagination and field selection: Cloud APIs frequently paginate collection responses; selecting fewer fields improves efficiency but does not eliminate the need to consume every page. It cannot substitute for the required control: messages eventually complete once at the business level even when delivery retries are observed.
Question 693
A worker acknowledges a message before committing its database update, losing the side effect when the database call fails. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect metric labels, log severity and correlation IDs, trace spans, and latency distribution across services.
- Inspect acknowledgment timing, lease extension, processing transaction order, and repeated message IDs.
- Inspect source provider, event type filters, service destination, trigger identity, and permission bindings.
- Inspect row-key distribution, access queries, tablet hot spots, and key-prefix cardinality.
Explanation
Correct Answer
B:Inspect acknowledgment timing, lease extension, processing transaction order, and repeated message IDs. This checks the actual operating conditions relevant to Pub/Sub acknowledgments and redelivery, rather than changing a service before the failure is understood. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect metric labels, log severity and correlation IDs, trace spans, and latency distribution across services. Metrics summarize behavior, logs describe events, and traces connect work across service boundaries; their combined context supports root-cause analysis. The first evidence should address pub/sub acknowledgments and redelivery, not this separate diagnostic path.
C:Inspect source provider, event type filters, service destination, trigger identity, and permission bindings. Eventarc event filters constrain selection while destination IAM controls delivery; a matching event does not bypass invoker authorization. The first evidence should address pub/sub acknowledgments and redelivery, not this separate diagnostic path.
D:Inspect row-key distribution, access queries, tablet hot spots, and key-prefix cardinality. Bigtable performance depends heavily on row-key design; monotonically increasing leading keys can concentrate writes and increase hotspots. The first evidence should address pub/sub acknowledgments and redelivery, not this separate diagnostic path.
Question 694
A worker acknowledges a message before committing its database update, losing the side effect when the database call fails. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Workflows to coordinate the required service calls with explicit conditionals and error handling.
- Acknowledge only after durable processing and make the handler idempotent to expected redelivery.
- Issue narrowly scoped Cloud Storage signed URLs for specific object methods and expiration windows.
- Use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling.
Explanation
Correct Answer
B:Acknowledge only after durable processing and make the handler idempotent to expected redelivery. Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. Before rollout, inspect acknowledgment timing, lease extension, processing transaction order, and repeated message IDs. A worker acknowledges a message before committing its database update, losing the side effect when the database call fails. The team is choosing a sustainable solution.
Incorrect Answers
A:Use Workflows to coordinate the required service calls with explicit conditionals and error handling. This design addresses Workflows multi-step service orchestration, where Workflows coordinates multi-step application processes; simply placing independent messages on topics does not create a deterministic state machine. The reported condition is about pub/sub acknowledgments and redelivery, not this adjacent change.
C:Issue narrowly scoped Cloud Storage signed URLs for specific object methods and expiration windows. For this case, Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. The reported condition is about pub/sub acknowledgments and redelivery, not this adjacent change.
D:Use bounded per-instance connection pools with application-level limits appropriate to aggregate autoscaling. For this case, Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. The reported condition is about pub/sub acknowledgments and redelivery, not this adjacent change.
Question 695
A worker acknowledges a message before committing its database update, losing the side effect when the database call fails. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Wrap stock validation and update in a transaction and test parallel competing purchases.
- Create one authorized job with explicit schedule zone and test its authenticated endpoint and job uniqueness key.
- Use supported client deadline-extension behavior and a stable operation identifier around the database update.
- Implement the same authorized operation using the appropriate supported API surface and validate response parsing.
Explanation
Correct Answer
C:Use supported client deadline-extension behavior and a stable operation identifier around the database update. Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. Validate the change by checking that messages eventually complete once at the business level even when delivery retries are observed. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Wrap stock validation and update in a transaction and test parallel competing purchases. This action changes a different concern, Firestore transactional document updates. Applying it first would leave pub/sub acknowledgments and redelivery unresolved.
B:Create one authorized job with explicit schedule zone and test its authenticated endpoint and job uniqueness key. This action changes a different concern, Cloud Scheduler recurring trigger design. Applying it first would leave pub/sub acknowledgments and redelivery unresolved.
D:Implement the same authorized operation using the appropriate supported API surface and validate response parsing. This action changes a different concern, Cloud Client Libraries versus raw REST. Applying it first would leave pub/sub acknowledgments and redelivery unresolved.
Question 696
A worker acknowledges a message before committing its database update, losing the side effect when the database call fails. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Messages eventually complete once at the business level even when delivery retries are observed.
- Each dependent step runs in the correct order, and failures are handled with recorded state and recovery decisions.
- The client uploads or downloads only its authorized object during the permitted period without bucket-wide credentials.
- The reconciliation triggers on the expected business schedule without duplicate side effects across instances.
Explanation
Correct Answer
A:Messages eventually complete once at the business level even when delivery retries are observed. Pub/Sub normally uses at-least-once delivery; missing or expired acknowledgment permits redelivery and requires consumer-side idempotency. The original diagnosis should have included this step: inspect acknowledgment timing, lease extension, processing transaction order, and repeated message IDs. A worker acknowledges a message before committing its database update, losing the side effect when the database call fails. The team has tried a correction.
Incorrect Answers
B:Each dependent step runs in the correct order, and failures are handled with recorded state and recovery decisions. That result could support testing of Workflows multi-step service orchestration: Workflows coordinates multi-step application processes; simply placing independent messages on topics does not create a deterministic state machine. That may help elsewhere, but it does not make the change required for pub/sub acknowledgments and redelivery.
C:The client uploads or downloads only its authorized object during the permitted period without bucket-wide credentials. That may help elsewhere, but it does not make the change required for pub/sub acknowledgments and redelivery.
D:The reconciliation triggers on the expected business schedule without duplicate side effects across instances. That result could support testing of Cloud Scheduler recurring trigger design: Cloud Scheduler supplies scheduled triggers; exactly-once business execution still requires receiver-level idempotency. That may help elsewhere, but it does not make the change required for pub/sub acknowledgments and redelivery.
Question 697
A malformed event repeatedly fails parsing and prevents efficient progress through a subscriber's retry queue. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect row-key distribution, access queries, tablet hot spots, and key-prefix cardinality.
- Inspect proxy authentication, instance IAM role, database authentication method, and SQL grant permissions separately.
- Inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification.
- Inspect bucket lifecycle rules, object age, retention policy locks, and legal retention requirements.
Explanation
Correct Answer
C:Inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification. This checks the actual operating conditions relevant to Pub/Sub dead-letter handling, rather than changing a service before the failure is understood. A focused follow-up is to configure and test a poison message, including correct permissions for dead-letter forwarding and monitoring.
Incorrect Answers
A:Inspect row-key distribution, access queries, tablet hot spots, and key-prefix cardinality. Bigtable performance depends heavily on row-key design; monotonically increasing leading keys can concentrate writes and increase hotspots. The more informative check is to inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification.
B:Inspect proxy authentication, instance IAM role, database authentication method, and SQL grant permissions separately. Cloud SQL connectors and proxy handle authenticated connectivity, while database-level identities and grants still govern SQL actions. The more informative check is to inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification.
D:Inspect bucket lifecycle rules, object age, retention policy locks, and legal retention requirements. Lifecycle policies automate object management, but enforceable retention controls can prevent deletion until the obligation expires. The more informative check is to inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification.
Question 698
A malformed event repeatedly fails parsing and prevents efficient progress through a subscriber's retry queue. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Cloud Scheduler for managed recurring triggers and make the target idempotent for retry or duplicate delivery.
- Route persistently unprocessable messages to a configured dead-letter topic after a bounded attempt policy.
- Use Error Reporting and evidence-grounded Cloud Observability assistance as diagnostic inputs, not automatic authorization to change production.
- Instrument the application with appropriate Google Cloud Observability metrics, structured logs, and distributed traces.
Explanation
Correct Answer
B:Route persistently unprocessable messages to a configured dead-letter topic after a bounded attempt policy. Dead-letter routing isolates messages that exceed allowed delivery attempts; it does not itself repair invalid data or guarantee business processing. Before rollout, inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification.
Incorrect Answers
A:Use Cloud Scheduler for managed recurring triggers and make the target idempotent for retry or duplicate delivery. This design addresses Cloud Scheduler recurring trigger design, where Cloud Scheduler supplies scheduled triggers; exactly-once business execution still requires receiver-level idempotency. The case instead calls for the following: route persistently unprocessable messages to a configured dead-letter topic after a bounded attempt policy.
C:Use Error Reporting and evidence-grounded Cloud Observability assistance as diagnostic inputs, not automatic authorization to change production. This design addresses error Reporting and AI-assisted observability, where error Reporting groups detected exceptions; AI-assisted observability can aid investigation but does not replace validated diagnosis and authorized change control. The case instead calls for the following: route persistently unprocessable messages to a configured dead-letter topic after a bounded attempt policy.
D:Instrument the application with appropriate Google Cloud Observability metrics, structured logs, and distributed traces. This design addresses metrics logs and distributed traces correlation, where metrics summarize behavior, logs describe events, and traces connect work across service boundaries; their combined context supports root-cause analysis. The case instead calls for the following: route persistently unprocessable messages to a configured dead-letter topic after a bounded attempt policy.
Question 699
A malformed event repeatedly fails parsing and prevents efficient progress through a subscriber's retry queue. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Configure a test bucket's lifecycle policy and separately validate the required retention policy against sample objects.
- Create an authenticated task queue and verify a temporary HTTP failure leads to bounded retry without duplicate business effects.
- Activate the intended service and run one authorized request plus a negative permission test.
- Configure and test a poison message, including correct permissions for dead-letter forwarding and monitoring.
Explanation
Correct Answer
D:Configure and test a poison message, including correct permissions for dead-letter forwarding and monitoring. Dead-letter routing isolates messages that exceed allowed delivery attempts; it does not itself repair invalid data or guarantee business processing. Validate the change by checking that malformed messages are isolated with traceable failure evidence while valid messages continue processing.
Incorrect Answers
A:Configure a test bucket's lifecycle policy and separately validate the required retention policy against sample objects. This action changes a different concern, Cloud Storage lifecycle and retention controls. It cannot substitute for the required control: configure and test a poison message, including correct permissions for dead-letter forwarding and monitoring.
B:Create an authenticated task queue and verify a temporary HTTP failure leads to bounded retry without duplicate business effects. This action changes a different concern, Cloud Tasks targeted HTTP retry work. It cannot substitute for the required control: configure and test a poison message, including correct permissions for dead-letter forwarding and monitoring.
C:Activate the intended service and run one authorized request plus a negative permission test. This action changes a different concern, google Cloud API enablement and service identity. It cannot substitute for the required control: configure and test a poison message, including correct permissions for dead-letter forwarding and monitoring.
Question 700
A malformed event repeatedly fails parsing and prevents efficient progress through a subscriber's retry queue. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The intended endpoint processes tasks under rate limits, and failed callbacks recover within policy.
- The reconciliation triggers on the expected business schedule without duplicate side effects across instances.
- Malformed messages are isolated with traceable failure evidence while valid messages continue processing.
- Objects transition or expire according to policy without deleting data still under mandatory retention.
Explanation
Correct Answer
C:Malformed messages are isolated with traceable failure evidence while valid messages continue processing. Dead-letter routing isolates messages that exceed allowed delivery attempts; it does not itself repair invalid data or guarantee business processing. The original diagnosis should have included this step: inspect delivery attempt counts, retry policy, dead-letter topic configuration, and failure classification.
Incorrect Answers
A:The intended endpoint processes tasks under rate limits, and failed callbacks recover within policy. In this scenario, a malformed event repeatedly fails parsing and prevents efficient progress through a subscriber's retry queue. It addresses a different dependency from pub/sub dead-letter handling.
B:The reconciliation triggers on the expected business schedule without duplicate side effects across instances. That result could support testing of Cloud Scheduler recurring trigger design: Cloud Scheduler supplies scheduled triggers; exactly-once business execution still requires receiver-level idempotency. It addresses a different dependency from pub/sub dead-letter handling.
D:Objects transition or expire according to policy without deleting data still under mandatory retention. That result could support testing of Cloud Storage lifecycle and retention controls: Lifecycle policies automate object management, but enforceable retention controls can prevent deletion until the obligation expires. It addresses a different dependency from pub/sub dead-letter handling.