What is the difference between an event bus (engine) and a message queue?

what"s the difference between an event bus (engine) and a message queue?

Sep.07,2021

event bus contains multiple message queues, that is, all events are received, and internal logic determines which message queue to push to


try to answer:

they have different roles in the system architecture.

  • eventbus, which is the event distribution center, is responsible for collecting and distributing events. It itself does not consume events.
  • mq, is generally an event handler, and after receiving the event, it consumes it internally.

eventbus can dispatch collected events to heterogeneous consumer (such as mq) to handle.

of course, event bus is a pattern, and mq is a technology. You can modify mq and let mq realize the function of event bus, then the modified mq can also be used as event bus at this time.

Menu