QuestionQ116

VerifiedDesigning scalable, available, and reliable cloud-native applications

You are a developer building an internal payroll-processing application. You are creating a component that lets an employee submit a timesheet, which triggers several actions:

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

These actions do not depend on one another and may finish in any order. Additional actions are under consideration and will be implemented by different development teams. Each team will implement error handling specific to its own action. What should you do?

Explanation

Google Cloud Pub/Sub is an asynchronous messaging service that decouples event producers from processing services. Publishing each timesheet-submitted event to one topic and creating one subscription per downstream team gives every subscriber its own copy of the event, allowing independent processing, retries, and error handling. Additional consumers can be added by attaching subscriptions without changing the timesheet-submission component.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!