Using Message Brokers: RabbitMQ

Blog > Message Broker

Before we start with RabbitMq, some specific topics should be explained.

Monolithic Architecture

A monolithic architecture is the traditional unified model for the design of a software program. Monolithic, in this context, means composed all in one piece. Monolithic software is designed to be self-contained; components of the program are interconnected and interdependent rather than loosely coupled as is the case with modular software programs. In a tightly-coupled architecture, each component and its associated components must be present for code to be executed or compiled.

Microservice Architecture

A microservice architecture is an architectural style that structures an application as a collection of services that are highly maintainable and testable, loosely coupled, and independently deployable. The microservice architecture enables the rapid, frequent, and reliable delivery of large, complex applications. Also, Microservice Architecture provides flexibility during the project development which makes it easier and less time-consuming at the project development phase.

Handling the Communication Between Microservices

As we mentioned above, microservices do need communication with each other. Ideally, the communication between microservices should be minimized which means, the fewer communications between microservices, the better. But in many cases, you'll have to integrate the microservices. When communication is needed, the critical rule is that communication should be asynchronous. The most popular protocol for this type of communication is AMQP (Advanced Message Queuing Protocol), which is supported by many operating systems and cloud providers. That is where Message Brokers is being used.

Message Broker

A message broker is an architectural pattern for message validation, transformation, and routing. It manages the communication among applications, minimizing the mutual awareness that applications should have of each other to be able to exchange messages, effectively implementing decoupling. It provides the exchange of information between applications by transmitting messages received from the producer to the consumer.

RabbitMQ

RabbitMQ is an open-source and widely used message broker software. It gives your applications a common platform to send and receive messages, and your messages a safe place to live until received. Some of the features of RabbitMQ given below:

  • Reliability
  • Flexible Routing
  • Clustering
  • Highly Available Queues
  • Multi Protocol
  • Tracing
  • Extendable Plugin System
  • Lots of supported clients (programming languages and frameworks)

Tags