MSA해설/EDA

Event Driven Architecture 정의

kooangelo 2022. 12. 2. 11:54

https://en.wikipedia.org/wiki/Event-driven_architecture

 

Event-driven architecture - Wikipedia

Event-driven architecture (EDA) is a software architecture paradigm promoting the production, detection, consumption of, and reaction to events. Overview[edit] An event can be defined as "a significant change in state".[1] For example, when a consumer purc

en.wikipedia.org

위의 내용에서 발췌


Event-driven architecture (EDA) is

a software architecture paradigm promoting 
the production, detection, consumption of, and reaction to events.

 

이벤트의

  • 생산 (Publisher)
    DDD에서는 Aggregate 에서 생산한다고 하는데, 거기에 국한해서 생각하기 보다는
    Microservice 내에서 로컬 트랜잭션이 완료된 후 이벤트를 생산
    (누군가에게 다른 업무에서 중요한 사건이 일어났음을 알려주기 위해, Broadcasting 하기 위해) 
  • 발견
    내가 구독하고 있는 어떤 이벤트가 발생했음을 알아차리는 것 
  • 소비 (Subscriber)
    MQ로 부터 이벤트를 구독해서, 받아와서 내 Microservice 에서 적절히, 내 나름의 로직으로 소화한다
  • 반응