esbsoamq

Difference between MQ and ESB


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!!


Solution

  • 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:

    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-subscribe 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.

    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 produce messages using http protocol and deliver them as files. They want to reformat message from xml to json to edi. They can have needs whatever their hearts desire. The point being those needs require functionality that is too specific to be just downloaded from Internet. As solution ESBs offer message servers which are extendable by user programming. All modern ESB's provide programming extendibility 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 have lost a lot of popularity in 2020's. But I believe they can be used properly by skilled IT.

    Finally on strange naming by IBM which often leads to MQ - Broker confusion. Their MQ software: is named "IBM MQ" in 2020, was "WebSphere MQ" in 2010s, was "MQ Series" in 1990s. Their ESB: is named "IBM App Connect Enterprise" in 2020, was "Integration Bus" in 2016, was "WebSphere Message Broker" in 2010. Naming one product "Message Broker" implies that "IBM MQ" isn't proper broker (as defined in introduction). Because why would anybody have more than one Broker in portfolio!? But it is wrong conclusion, caused by confusing naming. MQ is as message broker implementation as much as "Message Broker" is. It's just different type of Message Broker. Much cheaper and much more focused.