
Answer-first summary for fast verification
Answer: Implement specific exception handlers for common exceptions like data format errors and network failures, and use a dead-letter queue to manage unhandled exceptions.
Option B is the most effective approach for handling exceptions in a critical pipeline like financial transactions. Specific exception handlers ensure that common issues are addressed promptly, and a dead-letter queue provides a mechanism for managing unhandled exceptions, ensuring that no data is lost and all issues are logged for further analysis.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are tasked with configuring exception handling in a stream processing pipeline that processes financial transactions. The pipeline must ensure that all transactions are processed accurately and any exceptions are logged and handled appropriately. Describe how you would set up exception handling in this scenario, including the types of exceptions you would expect and the mechanisms you would use to manage them.
A
Use a try-catch block around the entire pipeline and log all exceptions to a centralized error log.
B
Implement specific exception handlers for common exceptions like data format errors and network failures, and use a dead-letter queue to manage unhandled exceptions.
C
Ignore exceptions and rely on the pipeline's built-in resilience mechanisms to handle any issues.
D
Periodically check the pipeline's health and manually intervene to resolve any exceptions.
No comments yet.