Explain Message-Driven vs Event-Driven Approaches

Technology CommunityCategory: Reactive SystemsExplain Message-Driven vs Event-Driven Approaches
VietMX Staff asked 3 years ago
  • message is an item of data that is sent to a specific destination.
  • An event is a signal emitted by a component upon reaching a given state.

In a message-driven system addressable recipients await the arrival of messages and react to them, otherwise lying dormant. In an event-driven system notification listeners are attached to the sources of events such that they are invoked when the event is emitted. This means that an event-driven system focuses on addressable event sources while a message-driven system concentrates on addressable recipients. A message can contain an encoded event as its payload.