Analysis of event-driven and message-driven

information

A message generally refers to some data sent to a specified address. In a message-driven system, each component generally has a dedicated queue for receiving messages.

event

Events are generally generated by a component and provided to any component that needs to use the event

The difference between message-driven and event-driven

As mentioned above, the biggest difference is that the message driver has a specified address to send, while the event driver does not.
Generally speaking, each component in a message-driven system has a queue dedicated to receiving messages for buffering. Each component of the event-driven system also has a queue dedicated to storing the queue, so that components interested in this event can listen to this queue.
A noteworthy point is that an event is also a kind of message . Message-driven and event-driven are not the same in terms of definition. Message-driven is a lower-level term, so it stands to reason that an event-driven system can be built with message-driven tools.

Guess you like

Origin blog.csdn.net/weixin_55658418/article/details/127635014