1
votes

can anyone tell me what is a difference between MQ (Message queue) and ESB (Enterprise Service Bus)? I know that both provide inter proces comunication and deal with messaging but on the internet there is not as much information and everyone is describing it differently. I also don't know what is difference between Message broker and ESB? Is ESB a Message broker? Is it true that MQ serves just basic purposes for standard communication and ESB provides something extra - like monitoring, etc? Or is MQ just basic message que, where are the messages stored and without any component you can`t do anything with it? Thanks!!

1
Does this answer your question? Difference between a Message Broker and an ESB - Dilan
Simple Difference on apps use it: MQ : Used for transport of messages between systems. ESB: Transform the message There are many other difference, but the above difference is very basic. - psingh

1 Answers

4
votes

Message Broker is an architectural pattern - an idea how to make a piece of software. There is a nice Wikipedia article on it. In general it is "a software server which routes messages" where messages are app level protocol. TCP routers are not Message broker because they route messages on network level.

Broadly speaking any Message Queue software is a server which:

  • is used to distribute messages between clients
  • messages are sent to server by clients acting as Producers
  • messages are stored in a "queue" until consumed (read) by clients acting as Consumers
  • messages are read from queues in FIFO order
  • consuming a message deletes it from a queue
  • messaging is asynchronous - meaning that producers and consumers don't have to be active at the same time - instead messages are stored by mq server until consumed.

Any MQ server is an implementation of a Message Broker pattern.

There are various MQ products: ActiveMQ, RabbitMQ and IBM MQ are the most popular examples. All of them have functionality which is bigger than this explanation.

Also, there is a lot of software which is not a MQ, but it is a very close to being one. Apache Kafka is popular asynchronous message server which uses topics instead queues (publish-suscribe pattern). ZeroMQ is messaging lib which is able to provide a lot of MQ functionality without using centralized server - it is a socket wrapper with a MQ programming model.

Finally - ESB - is again type of messaging server software. But which is made to be extendable by user. In more complex situation people want and need various functionality on top of a simple Message Broker. Like being able to redirect messages based on some properties like time of day or message content. They want to send message using http protocol and deliver it as file. They want to reformat message from xml to json to edi. Whatever their hearts desire. It is a functionality that is too specific to be just downloaded from Internet; as solution ESBs offer servers which are extendable by user programming. All modern ESB's provide programming extendability and a lot of premade modules for most common scenarios (a file writer, a http exit, a soap parser etc.). In practice ESB solutions are large (hard to learn, easy to broke) and expensive so they lost a lot of popularity in 2020's. But I beleive they can be used properly by skilled IT.

Finally on strange naming by IBM which often leads to MQ - Broker confusion. Their MQ sofware: is IBM MQ in 2020, was WebSphere MQ in 2010s, was MQ Series in 1990s. Thier ESB: is IBM App Connect Enterpries in 2020, was Integration Bus in 2016, was WebSphere Message Broker in 2010. Naming ESB "Message Broker" somehow implies that MQ isn't a proper Broker which it is.