Google Cloud Professional Cloud Developer — Question 161

You are a developer working on an internal application for payroll processing. You are building a component of the application that allows an employee to submit a timesheet, which then initiates several steps:

• An email is sent to the employee and manager, notifying them that the timesheet was submitted.
• A timesheet is sent to payroll processing for the vendor's API.
• A timesheet is sent to the data warehouse for headcount planning.

These steps are not dependent on each other and can be completed in any order. New steps are being considered and will be implemented by different development teams. Each development team will implement the error handling specific to their step. What should you do?

Answer options

Correct answer: C

Explanation

The correct answer is C because using a single Pub/Sub topic for timesheet submissions allows all independent actions to be triggered asynchronously, accommodating future steps without needing to create additional topics for each. Options A and D are incorrect because they impose sequential processing and do not leverage the benefits of asynchronous architecture, which is essential for independent actions. Option B, while potentially viable, complicates the design by creating multiple topics, which is unnecessary for the described use case.