views:

131

answers:

1

what's the difference between a message bus[1] and a message broker[2]

  • Both is middleware for applications
  • Both can be used to decouple various systems
  • Both can have a canonical data model
  • Both route messages and could offer other features such as data transform

As i see, the only relevent difference is the picture used to represent each of one..

If there's some difference between then, please tell-me what.
If they are the same, plese tell-me why two concepts to refer the same functionality.

Thanks.

[1] http://www.eaipatterns.com/MessageBus.html
[2] http://www.eaipatterns.com/MessageBroker.html

+2  A: 

The message bus implies a common protocol spoken and understood by all participants. There is little to no logic in the bus. Usually the message is forwarded to all connected systems.

The hub-and-spoke architecture (or "message broker") has a central piece of software which understands the messages sent to it, can translate them, and forward them to the systems which need the information.

nhnb
Thanks. According to "Enterprise Integration Patterns" by Gregor Hohpe, a message bus has a router inside. In fact, it can support message exchange patterns such as publish-subscribe, so it is not a simple message repeater. The message bus use a canonical data model but aplications can use adapters, so it is not mandatory all aplications use the same data format. Finally, you say that a message broker is a "central piece of software" but after implemented, you can look at message bus by the same way (all aplications send messages to the same endpoint).
Zé Carlos