Discussion
State whether the following is true or false.
A function should be written so that running it twice with the same event is safe.
Answer: B
Correct answer: True
Event delivery is generally at-least-once, so retries after a timeout or a transient error can deliver the same event twice, and a function that is not idempotent will double-charge, double-post or corrupt its state. Writing with an idempotency key, or making the operation naturally repeatable, is therefore a requirement of the model rather than a refinement.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development