Message brokers and brief comparison of them - Part 1

Asela Dasanayaka
2 min readFeb 16, 2018

--

What is message broker?

Message brokers are important components of modern web technology. They are middleware programs that provide asynchronous communication between different components of a software architecture using publish-subscribe paradigm. It means that both sender and receiver are loosely coupled and both not need to be online at the same time to communicate.

All good, now comes interesting question

Why need message broker?

Basically, message brokers used for

  • To ensure loosely coupling between producer and consumer
  • To maintain asynchronous/ non-blocking communication between producer and consumer
  • In case consumer cannot process messages as fast as producer sending (Messages can be buffered in queue)

So, message brokers are used to enhancing the scalability of communication layer.

So, what is the message brokers general architecture?

Server publishes their messages to some specific topic inside broker and if client subscribes that particular topic client receives messages that published by the server. The reverse is also possible. Messages bodies can be a different format (JSON, XML, text, binary etc.).

There are lots of message brokers available. In this articles series, I am going to talk about following message brokers.

  1. Apache Kafka
  2. RabbitMQ
  3. Apache ActiveMQ
  4. Kestrel
  5. WSO2 Message Broker

Here is the interesting question.

How to choose a message broker?

Well, there is no straight answer to that question. Each system has its own set of requirements, programming languages etc. When selecting message broker all these factors need to be considered.

There are the seven most essential features that I consider important.

  • High availability
  • Persistence/ Durability
  • Developer friendly
  • Brokered (All communication passed trough broker)
  • Guaranteed delivery and delivery acknowledgement
  • Easy to configure
  • Stable enough for production

See you soon in part 2. In there we will discuss architectures of above mentioned message brokers and there pros and cons.

Good luck. Cheers!

--

--

Asela Dasanayaka
Asela Dasanayaka

Written by Asela Dasanayaka

Software Engineer, Data Science Enthusiast

Responses (5)