Discussion
Which design pattern is most suitable for decoupling components in an event-driven architecture ?
Answer: C
The pattern is Observer.
In the observer (publish-subscribe) pattern, a subject keeps a list of observers and notifies them when an event occurs, without knowing what they are or what they do. Components can be added or removed by subscribing or unsubscribing, which decouples event producers from consumers, the core of event-driven design.
Singleton ensures a class has one instance, factory centralises object creation, and adapter converts one interface into another. None of them is about delivering events between independent components.
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